aboutsummaryrefslogtreecommitdiffstats
path: root/include/soc/mscc/ocelot.h
diff options
context:
space:
mode:
authorClément Léger <clement.leger@bootlin.com>2021-12-09 16:49:11 +0100
committerJakub Kicinski <kuba@kernel.org>2021-12-10 20:56:58 -0800
commit753a026cfec1429c9e32e004ae4d4c2727cc0111 (patch)
tree77627e06c25eebfc50e4bbcc05d7a3c1cbb160fc /include/soc/mscc/ocelot.h
parentnet: ocelot: add support for ndo_change_mtu (diff)
downloadlinux-dev-753a026cfec1429c9e32e004ae4d4c2727cc0111.tar.xz
linux-dev-753a026cfec1429c9e32e004ae4d4c2727cc0111.zip
net: ocelot: add FDMA support
Ethernet frames can be extracted or injected autonomously to or from the device’s DDR3/DDR3L memory and/or PCIe memory space. Linked list data structures in memory are used for injecting or extracting Ethernet frames. The FDMA generates interrupts when frame extraction or injection is done and when the linked lists need updating. The FDMA is shared between all the ethernet ports of the switch and uses a linked list of descriptors (DCB) to inject and extract packets. Before adding descriptors, the FDMA channels must be stopped. It would be inefficient to do that each time a descriptor would be added so the channels are restarted only once they stopped. Both channels uses ring-like structure to feed the DCBs to the FDMA. head and tail are never touched by hardware and are completely handled by the driver. On top of that, page recycling has been added and is mostly taken from gianfar driver. Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Co-developed-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Clément Léger <clement.leger@bootlin.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/soc/mscc/ocelot.h')
-rw-r--r--include/soc/mscc/ocelot.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/soc/mscc/ocelot.h b/include/soc/mscc/ocelot.h
index f038062a97a9..3e9454b00562 100644
--- a/include/soc/mscc/ocelot.h
+++ b/include/soc/mscc/ocelot.h
@@ -118,6 +118,7 @@ enum ocelot_target {
S2,
HSIO,
PTP,
+ FDMA,
GCB,
DEV_GMII,
TARGET_MAX,
@@ -732,6 +733,8 @@ struct ocelot {
/* Protects the PTP clock */
spinlock_t ptp_clock_lock;
struct ptp_pin_desc ptp_pins[OCELOT_PTP_PINS_NUM];
+
+ struct ocelot_fdma *fdma;
};
struct ocelot_policer {