diff options
author | Ioana Radulescu <ruxandra.radulescu@nxp.com> | 2018-08-29 04:42:40 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-01 17:16:59 -0700 |
commit | 34ff68465a17d0c1f022ec9086504cb27dbb2fd7 (patch) | |
tree | fbbb4826b8e490fb05fafebe8a6347c2ab163198 /drivers | |
parent | 7f12c8a3670f15ab8592c287279a4050960a7fc6 (diff) | |
download | blackbird-obmc-linux-34ff68465a17d0c1f022ec9086504cb27dbb2fd7.tar.gz blackbird-obmc-linux-34ff68465a17d0c1f022ec9086504cb27dbb2fd7.zip |
dpaa2-eth: Move DPAA2 Ethernet driver from staging to drivers/net
The DPAA2 Ethernet driver supports Freescale/NXP SoCs with DPAA2
(DataPath Acceleration Architecture v2). The driver manages
network objects discovered on the fsl-mc bus.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/freescale/Kconfig | 8 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/Makefile | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/dpaa2/Makefile (renamed from drivers/staging/fsl-dpaa2/ethernet/Makefile) | 0 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-trace.h (renamed from drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth-trace.h) | 0 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c (renamed from drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c) | 0 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h (renamed from drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h) | 0 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c (renamed from drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c) | 0 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/dpaa2/dpkg.h (renamed from drivers/staging/fsl-dpaa2/ethernet/dpkg.h) | 0 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/dpaa2/dpni-cmd.h (renamed from drivers/staging/fsl-dpaa2/ethernet/dpni-cmd.h) | 0 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/dpaa2/dpni.c (renamed from drivers/staging/fsl-dpaa2/ethernet/dpni.c) | 0 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/dpaa2/dpni.h (renamed from drivers/staging/fsl-dpaa2/ethernet/dpni.h) | 0 | ||||
-rw-r--r-- | drivers/staging/fsl-dpaa2/Kconfig | 8 | ||||
-rw-r--r-- | drivers/staging/fsl-dpaa2/Makefile | 1 | ||||
-rw-r--r-- | drivers/staging/fsl-dpaa2/ethernet/TODO | 18 | ||||
-rw-r--r-- | drivers/staging/fsl-dpaa2/ethernet/ethernet-driver.rst | 185 |
15 files changed, 10 insertions, 212 deletions
diff --git a/drivers/net/ethernet/freescale/Kconfig b/drivers/net/ethernet/freescale/Kconfig index a580a3dcbe59..7a30276e1ba6 100644 --- a/drivers/net/ethernet/freescale/Kconfig +++ b/drivers/net/ethernet/freescale/Kconfig @@ -97,4 +97,12 @@ config GIANFAR source "drivers/net/ethernet/freescale/dpaa/Kconfig" +config FSL_DPAA2_ETH + tristate "Freescale DPAA2 Ethernet" + depends on FSL_MC_BUS && FSL_MC_DPIO + depends on NETDEVICES && ETHERNET + ---help--- + Ethernet driver for Freescale DPAA2 SoCs, using the + Freescale MC bus driver + endif # NET_VENDOR_FREESCALE diff --git a/drivers/net/ethernet/freescale/Makefile b/drivers/net/ethernet/freescale/Makefile index 0914a3ea4405..3b4ff08e3841 100644 --- a/drivers/net/ethernet/freescale/Makefile +++ b/drivers/net/ethernet/freescale/Makefile @@ -21,3 +21,5 @@ ucc_geth_driver-objs := ucc_geth.o ucc_geth_ethtool.o obj-$(CONFIG_FSL_FMAN) += fman/ obj-$(CONFIG_FSL_DPAA_ETH) += dpaa/ + +obj-$(CONFIG_FSL_DPAA2_ETH) += dpaa2/ diff --git a/drivers/staging/fsl-dpaa2/ethernet/Makefile b/drivers/net/ethernet/freescale/dpaa2/Makefile index 9315ecdba612..9315ecdba612 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/Makefile +++ b/drivers/net/ethernet/freescale/dpaa2/Makefile diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth-trace.h b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-trace.h index 9801528db2a5..9801528db2a5 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth-trace.h +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-trace.h diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c index 559154a5d9e9..559154a5d9e9 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h index d54cb0b99d08..d54cb0b99d08 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c index 8056a95e1265..8056a95e1265 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpkg.h b/drivers/net/ethernet/freescale/dpaa2/dpkg.h index 6de613b13e4d..6de613b13e4d 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpkg.h +++ b/drivers/net/ethernet/freescale/dpaa2/dpkg.h diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpni-cmd.h b/drivers/net/ethernet/freescale/dpaa2/dpni-cmd.h index 83698abce8b4..83698abce8b4 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpni-cmd.h +++ b/drivers/net/ethernet/freescale/dpaa2/dpni-cmd.h diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpni.c b/drivers/net/ethernet/freescale/dpaa2/dpni.c index d6ac26797cec..d6ac26797cec 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpni.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpni.c diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpni.h b/drivers/net/ethernet/freescale/dpaa2/dpni.h index b378a00c7c53..b378a00c7c53 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpni.h +++ b/drivers/net/ethernet/freescale/dpaa2/dpni.h diff --git a/drivers/staging/fsl-dpaa2/Kconfig b/drivers/staging/fsl-dpaa2/Kconfig index a4c4b83ddc9c..59aaae7268cd 100644 --- a/drivers/staging/fsl-dpaa2/Kconfig +++ b/drivers/staging/fsl-dpaa2/Kconfig @@ -9,14 +9,6 @@ config FSL_DPAA2 Build drivers for Freescale DataPath Acceleration Architecture (DPAA2) family of SoCs. -config FSL_DPAA2_ETH - tristate "Freescale DPAA2 Ethernet" - depends on FSL_DPAA2 && FSL_MC_DPIO - depends on NETDEVICES && ETHERNET - ---help--- - Ethernet driver for Freescale DPAA2 SoCs, using the - Freescale MC bus driver - config FSL_DPAA2_ETHSW tristate "Freescale DPAA2 Ethernet Switch" depends on FSL_DPAA2 diff --git a/drivers/staging/fsl-dpaa2/Makefile b/drivers/staging/fsl-dpaa2/Makefile index 9c7062945758..464f242a8a4e 100644 --- a/drivers/staging/fsl-dpaa2/Makefile +++ b/drivers/staging/fsl-dpaa2/Makefile @@ -2,6 +2,5 @@ # Freescale DataPath Acceleration Architecture Gen2 (DPAA2) drivers # -obj-$(CONFIG_FSL_DPAA2_ETH) += ethernet/ obj-$(CONFIG_FSL_DPAA2_ETHSW) += ethsw/ obj-$(CONFIG_FSL_DPAA2_PTP_CLOCK) += rtc/ diff --git a/drivers/staging/fsl-dpaa2/ethernet/TODO b/drivers/staging/fsl-dpaa2/ethernet/TODO deleted file mode 100644 index e400a5e427a5..000000000000 --- a/drivers/staging/fsl-dpaa2/ethernet/TODO +++ /dev/null @@ -1,18 +0,0 @@ -* Add a DPAA2 MAC kernel driver in order to allow PHY management; currently - the DPMAC objects and their link to DPNIs are handled by MC internally - and all PHYs are seen as fixed-link -* add more debug support: decide how to expose detailed debug statistics, - add ingress error queue support -* MC firmware uprev; the DPAA2 objects used by the Ethernet driver need to - be kept in sync with binary interface changes in MC -* refine README file -* cleanup - -NOTE: None of the above is must-have before getting the DPAA2 Ethernet driver -out of staging. The main requirement for that is to have the drivers it -depends on, fsl-mc bus and DPIO driver, moved to drivers/bus and drivers/soc -respectively. - - Please send any patches to Greg Kroah-Hartman <gregkh@linuxfoundation.org>, - ruxandra.radulescu@nxp.com, devel@driverdev.osuosl.org, - linux-kernel@vger.kernel.org diff --git a/drivers/staging/fsl-dpaa2/ethernet/ethernet-driver.rst b/drivers/staging/fsl-dpaa2/ethernet/ethernet-driver.rst deleted file mode 100644 index 90ec940749e8..000000000000 --- a/drivers/staging/fsl-dpaa2/ethernet/ethernet-driver.rst +++ /dev/null @@ -1,185 +0,0 @@ -.. SPDX-License-Identifier: GPL-2.0 -.. include:: <isonum.txt> - -=============================== -DPAA2 Ethernet driver -=============================== - -:Copyright: |copy| 2017-2018 NXP - -This file provides documentation for the Freescale DPAA2 Ethernet driver. - -Supported Platforms -=================== -This driver provides networking support for Freescale DPAA2 SoCs, e.g. -LS2080A, LS2088A, LS1088A. - - -Architecture Overview -===================== -Unlike regular NICs, in the DPAA2 architecture there is no single hardware block -representing network interfaces; instead, several separate hardware resources -concur to provide the networking functionality: - -- network interfaces -- queues, channels -- buffer pools -- MAC/PHY - -All hardware resources are allocated and configured through the Management -Complex (MC) portals. MC abstracts most of these resources as DPAA2 objects -and exposes ABIs through which they can be configured and controlled. A few -hardware resources, like queues, do not have a corresponding MC object and -are treated as internal resources of other objects. - -For a more detailed description of the DPAA2 architecture and its object -abstractions see *Documentation/networking/dpaa2/overview.rst*. - -Each Linux net device is built on top of a Datapath Network Interface (DPNI) -object and uses Buffer Pools (DPBPs), I/O Portals (DPIOs) and Concentrators -(DPCONs). - -Configuration interface:: - - ----------------------- - | DPAA2 Ethernet Driver | - ----------------------- - . . . - . . . - . . . . . . . . . . . . - . . . - . . . - ---------- ---------- ----------- - | DPBP API | | DPNI API | | DPCON API | - ---------- ---------- ----------- - . . . software - ======= . ========== . ============ . =================== - . . . hardware - ------------------------------------------ - | MC hardware portals | - ------------------------------------------ - . . . - . . . - ------ ------ ------- - | DPBP | | DPNI | | DPCON | - ------ ------ ------- - -The DPNIs are network interfaces without a direct one-on-one mapping to PHYs. -DPBPs represent hardware buffer pools. Packet I/O is performed in the context -of DPCON objects, using DPIO portals for managing and communicating with the -hardware resources. - -Datapath (I/O) interface:: - - ----------------------------------------------- - | DPAA2 Ethernet Driver | - ----------------------------------------------- - | ^ ^ | | - | | | | | - enqueue| dequeue| data | dequeue| seed | - (Tx) | (Rx, TxC)| avail.| request| buffers| - | | notify| | | - | | | | | - V | | V V - ----------------------------------------------- - | DPIO Driver | - ----------------------------------------------- - | | | | | software - | | | | | ================ - | | | | | hardware - ----------------------------------------------- - | I/O hardware portals | - ----------------------------------------------- - | ^ ^ | | - | | | | | - | | | V | - V | ================ V - ---------------------- | ------------- - queues ---------------------- | | Buffer pool | - ---------------------- | ------------- - ======================= - Channel - -Datapath I/O (DPIO) portals provide enqueue and dequeue services, data -availability notifications and buffer pool management. DPIOs are shared between -all DPAA2 objects (and implicitly all DPAA2 kernel drivers) that work with data -frames, but must be affine to the CPUs for the purpose of traffic distribution. - -Frames are transmitted and received through hardware frame queues, which can be -grouped in channels for the purpose of hardware scheduling. The Ethernet driver -enqueues TX frames on egress queues and after transmission is complete a TX -confirmation frame is sent back to the CPU. - -When frames are available on ingress queues, a data availability notification -is sent to the CPU; notifications are raised per channel, so even if multiple -queues in the same channel have available frames, only one notification is sent. -After a channel fires a notification, is must be explicitly rearmed. - -Each network interface can have multiple Rx, Tx and confirmation queues affined -to CPUs, and one channel (DPCON) for each CPU that services at least one queue. -DPCONs are used to distribute ingress traffic to different CPUs via the cores' -affine DPIOs. - -The role of hardware buffer pools is storage of ingress frame data. Each network -interface has a privately owned buffer pool which it seeds with kernel allocated -buffers. - - -DPNIs are decoupled from PHYs; a DPNI can be connected to a PHY through a DPMAC -object or to another DPNI through an internal link, but the connection is -managed by MC and completely transparent to the Ethernet driver. - -:: - - --------- --------- --------- - | eth if1 | | eth if2 | | eth ifn | - --------- --------- --------- - . . . - . . . - . . . - --------------------------- - | DPAA2 Ethernet Driver | - --------------------------- - . . . - . . . - . . . - ------ ------ ------ ------- - | DPNI | | DPNI | | DPNI | | DPMAC |----+ - ------ ------ ------ ------- | - | | | | | - | | | | ----- - =========== ================== | PHY | - ----- - -Creating a Network Interface -============================ -A net device is created for each DPNI object probed on the MC bus. Each DPNI has -a number of properties which determine the network interface configuration -options and associated hardware resources. - -DPNI objects (and the other DPAA2 objects needed for a network interface) can be -added to a container on the MC bus in one of two ways: statically, through a -Datapath Layout Binary file (DPL) that is parsed by MC at boot time; or created -dynamically at runtime, via the DPAA2 objects APIs. - - -Features & Offloads -=================== -Hardware checksum offloading is supported for TCP and UDP over IPv4/6 frames. -The checksum offloads can be independently configured on RX and TX through -ethtool. - -Hardware offload of unicast and multicast MAC filtering is supported on the -ingress path and permanently enabled. - -Scatter-gather frames are supported on both RX and TX paths. On TX, SG support -is configurable via ethtool; on RX it is always enabled. - -The DPAA2 hardware can process jumbo Ethernet frames of up to 10K bytes. - -The Ethernet driver defines a static flow hashing scheme that distributes -traffic based on a 5-tuple key: src IP, dst IP, IP proto, L4 src port, -L4 dst port. No user configuration is supported for now. - -Hardware specific statistics for the network interface as well as some -non-standard driver stats can be consulted through ethtool -S option. |