]> git.baikalelectronics.ru Git - kernel.git/commit
net: mscc: Add initial Ocelot switch support
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 14 May 2018 20:04:57 +0000 (22:04 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 May 2018 20:41:15 +0000 (16:41 -0400)
commit1bed22a67906a79102d5467bac802422f5dc7101
treeea370c508b9f5da654abc40dd62c2bdfe7a217fa
parent7f8aee38ffc34dbc42c8e2485edd934cd6d96126
net: mscc: Add initial Ocelot switch support

Add a driver for Microsemi Ocelot Ethernet switch support.

This makes two modules:
mscc_ocelot_common handles all the common features that doesn't depend on
how the switch is integrated in the SoC. Currently, it handles offloading
bridging to the hardware. ocelot_io.c handles register accesses. This is
unfortunately needed because the register layout is packed and then depends
on the number of ports available on the switch. The register definition
files are automatically generated.

ocelot_board handles the switch integration on the SoC and on the board.

Frame injection and extraction to/from the CPU port is currently done using
register accesses which is quite slow. DMA is possible but the port is not
able to absorb the whole switch bandwidth.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 files changed:
drivers/net/ethernet/Kconfig
drivers/net/ethernet/Makefile
drivers/net/ethernet/mscc/Kconfig [new file with mode: 0644]
drivers/net/ethernet/mscc/Makefile [new file with mode: 0644]
drivers/net/ethernet/mscc/ocelot.c [new file with mode: 0644]
drivers/net/ethernet/mscc/ocelot.h [new file with mode: 0644]
drivers/net/ethernet/mscc/ocelot_ana.h [new file with mode: 0644]
drivers/net/ethernet/mscc/ocelot_board.c [new file with mode: 0644]
drivers/net/ethernet/mscc/ocelot_dev.h [new file with mode: 0644]
drivers/net/ethernet/mscc/ocelot_dev_gmii.h [new file with mode: 0644]
drivers/net/ethernet/mscc/ocelot_hsio.h [new file with mode: 0644]
drivers/net/ethernet/mscc/ocelot_io.c [new file with mode: 0644]
drivers/net/ethernet/mscc/ocelot_qs.h [new file with mode: 0644]
drivers/net/ethernet/mscc/ocelot_qsys.h [new file with mode: 0644]
drivers/net/ethernet/mscc/ocelot_regs.c [new file with mode: 0644]
drivers/net/ethernet/mscc/ocelot_rew.h [new file with mode: 0644]
drivers/net/ethernet/mscc/ocelot_sys.h [new file with mode: 0644]