diff options
Diffstat (limited to 'target/linux/layerscape/patches-4.9/704-fsl-mc-layerscape-support.patch')
-rw-r--r-- | target/linux/layerscape/patches-4.9/704-fsl-mc-layerscape-support.patch | 154 |
1 files changed, 7 insertions, 147 deletions
diff --git a/target/linux/layerscape/patches-4.9/704-fsl-mc-layerscape-support.patch b/target/linux/layerscape/patches-4.9/704-fsl-mc-layerscape-support.patch index a35e593105..976f801cdf 100644 --- a/target/linux/layerscape/patches-4.9/704-fsl-mc-layerscape-support.patch +++ b/target/linux/layerscape/patches-4.9/704-fsl-mc-layerscape-support.patch @@ -1,12 +1,12 @@ -From afb7254de9f03c3efaf4e306dcf5f88e1873fc6b Mon Sep 17 00:00:00 2001 +From 667f0792b6f6d000c10f21c29c397c84cbe77f4a Mon Sep 17 00:00:00 2001 From: Yangbo Lu <yangbo.lu@nxp.com> -Date: Mon, 25 Sep 2017 12:06:25 +0800 -Subject: [PATCH] fsl-mc: layerscape support +Date: Wed, 17 Jan 2018 15:11:45 +0800 +Subject: [PATCH 10/30] fsl-mc: layerscape support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -This is a integrated patch for layerscape mc-bus support. +This is an integrated patch for layerscape mc-bus support. Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com> Signed-off-by: Bharat Bhushan <Bharat.Bhushan@nxp.com> @@ -28,7 +28,6 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> drivers/staging/fsl-mc/bus/dpio/Makefile | 11 + .../{include/dpcon-cmd.h => bus/dpio/dpio-cmd.h} | 73 +- drivers/staging/fsl-mc/bus/dpio/dpio-driver.c | 296 ++++++ - drivers/staging/fsl-mc/bus/dpio/dpio-driver.txt | 135 +++ drivers/staging/fsl-mc/bus/dpio/dpio-service.c | 693 +++++++++++++ drivers/staging/fsl-mc/bus/dpio/dpio.c | 224 +++++ drivers/staging/fsl-mc/bus/dpio/dpio.h | 109 ++ @@ -48,9 +47,9 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 78 +- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 318 +++--- drivers/staging/fsl-mc/bus/fsl-mc-iommu.c | 104 ++ - drivers/staging/fsl-mc/bus/fsl-mc-msi.c | 3 +- + drivers/staging/fsl-mc/bus/fsl-mc-msi.c | 2 +- drivers/staging/fsl-mc/bus/fsl-mc-private.h | 6 +- - .../staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 11 +- + .../staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 10 +- drivers/staging/fsl-mc/bus/mc-io.c | 4 +- drivers/staging/fsl-mc/bus/mc-ioctl.h | 22 + drivers/staging/fsl-mc/bus/mc-restool.c | 405 ++++++++ @@ -68,14 +67,13 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> drivers/staging/fsl-mc/include/mc-cmd.h | 44 +- drivers/staging/fsl-mc/include/mc-sys.h | 3 +- drivers/staging/fsl-mc/include/mc.h | 17 +- - 49 files changed, 7384 insertions(+), 2612 deletions(-) + 48 files changed, 7247 insertions(+), 2612 deletions(-) create mode 100644 drivers/staging/fsl-mc/bus/dpbp-cmd.h create mode 100644 drivers/staging/fsl-mc/bus/dpcon-cmd.h create mode 100644 drivers/staging/fsl-mc/bus/dpcon.c create mode 100644 drivers/staging/fsl-mc/bus/dpio/Makefile rename drivers/staging/fsl-mc/{include/dpcon-cmd.h => bus/dpio/dpio-cmd.h} (64%) create mode 100644 drivers/staging/fsl-mc/bus/dpio/dpio-driver.c - create mode 100644 drivers/staging/fsl-mc/bus/dpio/dpio-driver.txt create mode 100644 drivers/staging/fsl-mc/bus/dpio/dpio-service.c create mode 100644 drivers/staging/fsl-mc/bus/dpio/dpio.c create mode 100644 drivers/staging/fsl-mc/bus/dpio/dpio.h @@ -1633,144 +1631,6 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> +module_init(dpio_driver_init); +module_exit(dpio_driver_exit); --- /dev/null -+++ b/drivers/staging/fsl-mc/bus/dpio/dpio-driver.txt -@@ -0,0 +1,135 @@ -+Copyright 2016 NXP -+ -+Introduction -+------------ -+ -+A DPAA2 DPIO (Data Path I/O) is a hardware object that provides -+interfaces to enqueue and dequeue frames to/from network interfaces -+and other accelerators. A DPIO also provides hardware buffer -+pool management for network interfaces. -+ -+This document provides an overview the Linux DPIO driver, its -+subcomponents, and its APIs. -+ -+See Documentation/dpaa2/overview.txt for a general overview of DPAA2 -+and the general DPAA2 driver architecture in Linux. -+ -+Driver Overview -+--------------- -+ -+The DPIO driver is bound to DPIO objects discovered on the fsl-mc bus and -+provides services that: -+ A) allow other drivers, such as the Ethernet driver, to enqueue and dequeue -+ frames for their respective objects -+ B) allow drivers to register callbacks for data availability notifications -+ when data becomes available on a queue or channel -+ C) allow drivers to manage hardware buffer pools -+ -+The Linux DPIO driver consists of 3 primary components-- -+ DPIO object driver-- fsl-mc driver that manages the DPIO object -+ DPIO service-- provides APIs to other Linux drivers for services -+ QBman portal interface-- sends portal commands, gets responses -+ -+ fsl-mc other -+ bus drivers -+ | | -+ +---+----+ +------+-----+ -+ |DPIO obj| |DPIO service| -+ | driver |---| (DPIO) | -+ +--------+ +------+-----+ -+ | -+ +------+-----+ -+ | QBman | -+ | portal i/f | -+ +------------+ -+ | -+ hardware -+ -+The diagram below shows how the DPIO driver components fit with the other -+DPAA2 Linux driver components: -+ +------------+ -+ | OS Network | -+ | Stack | -+ +------------+ +------------+ -+ | Allocator |. . . . . . . | Ethernet | -+ |(DPMCP,DPBP)| | (DPNI) | -+ +-.----------+ +---+---+----+ -+ . . ^ | -+ . . <data avail, | |<enqueue, -+ . . tx confirm> | | dequeue> -+ +-------------+ . | | -+ | DPRC driver | . +--------+ +------------+ -+ | (DPRC) | . . |DPIO obj| |DPIO service| -+ +----------+--+ | driver |-| (DPIO) | -+ | +--------+ +------+-----+ -+ |<dev add/remove> +------|-----+ -+ | | QBman | -+ +----+--------------+ | portal i/f | -+ | MC-bus driver | +------------+ -+ | | | -+ | /soc/fsl-mc | | -+ +-------------------+ | -+ | -+ =========================================|=========|======================== -+ +-+--DPIO---|-----------+ -+ | | | -+ | QBman Portal | -+ +-----------------------+ -+ -+ ============================================================================ -+ -+ -+DPIO Object Driver (dpio-driver.c) -+---------------------------------- -+ -+ The dpio-driver component registers with the fsl-mc bus to handle objects of -+ type "dpio". The implementation of probe() handles basic initialization -+ of the DPIO including mapping of the DPIO regions (the QBman SW portal) -+ and initializing interrupts and registering irq handlers. The dpio-driver -+ registers the probed DPIO with dpio-service. -+ -+DPIO service (dpio-service.c, dpaa2-io.h) -+------------------------------------------ -+ -+ The dpio service component provides queuing, notification, and buffers -+ management services to DPAA2 drivers, such as the Ethernet driver. A system -+ will typically allocate 1 DPIO object per CPU to allow queuing operations -+ to happen simultaneously across all CPUs. -+ -+ Notification handling -+ dpaa2_io_service_register() -+ dpaa2_io_service_deregister() -+ dpaa2_io_service_rearm() -+ -+ Queuing -+ dpaa2_io_service_pull_fq() -+ dpaa2_io_service_pull_channel() -+ dpaa2_io_service_enqueue_fq() -+ dpaa2_io_service_enqueue_qd() -+ dpaa2_io_store_create() -+ dpaa2_io_store_destroy() -+ dpaa2_io_store_next() -+ -+ Buffer pool management -+ dpaa2_io_service_release() -+ dpaa2_io_service_acquire() -+ -+QBman portal interface (qbman-portal.c) -+--------------------------------------- -+ -+ The qbman-portal component provides APIs to do the low level hardware -+ bit twiddling for operations such as: -+ -initializing Qman software portals -+ -building and sending portal commands -+ -portal interrupt configuration and processing -+ -+ The qbman-portal APIs are not public to other drivers, and are -+ only used by dpio-service. -+ -+Other (dpaa2-fd.h, dpaa2-global.h) -+---------------------------------- -+ -+ Frame descriptor and scatter-gather definitions and the APIs used to -+ manipulate them are defined in dpaa2-fd.h. -+ -+ Dequeue result struct and parsing APIs are defined in dpaa2-global.h. ---- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpio/dpio-service.c @@ -0,0 +1,693 @@ +/* |