[PATCH v3 0/9] staging: fsl-mc: move bus driver out of staging, add dpio

From: Stuart Yoder
Date: Thu Dec 01 2016 - 17:51:25 EST


This patch series: A) addresses the final item in the staging
TODO list for the fsl-mc bus driver-- adding a functional driver
on top of the bus driver, and B) requests that the fsl-mc bus driver
be moved out of staging.

The proposed destination for the bus driver is drivers/bus.
Proposed location for global header files for fsl-mc and dpaa2
is include/linux/fsl.

The functional driver added is for the DPIO object which provides
queuing services for other DPAA2 drivers. An overview of the
DPIO object and driver components are in patch 2. Patches 3-7 are
internal components of the DPIO driver-- bit twiddling of hardware
registers, DPAA2 data structures, and the queuing APIs exposed
to other drivers.

Patch 8 adds the fsl-mc driver for the DPIO object. It provides
the probe/remove functions, demonstrating a working example of
how fsl-mc drivers initialize, interact with the management
complex hardware, map their mappable MMIO regions, initialize
interrupts, register an ISR, etc. All other DPAA2 drivers will
follow a similar initialization pattern.

The dpio driver is added under drivers/bus/fsl-mc/dpio. This
driver provides queueing related services and there is no other
obvious place it would go. Like the bus driver, it is part of
the DPAA2 infrastucture and putting it under the fsl-mc bus
driver seems like a logical place.

version 3 changes
-zero memory allocated for a dpio store
-replace hardcoded dequeue token with a #define and look for
that token when checking for a new result

version 2 changes (mostly feedback from Ioana Radulescu)
-removed unused structs and defines in dpio command definitions
-added setter/getter for the FD ctrl field
-corrected comment for SG format_offset field description
-added support for short length field in FD
-fix bug in buffer release command, by setting bpid field
-handle error (NULL) return value from qbman_swp_mc_complete()
-fix bug in sending management commands where the verb was
properly initialized
-use service_select_by_cpu() for re-arming DPIO interrupts
-replace use of NR_CPUS with num_possible_cpus()
-handle error case where number of DPIOs exceeds number of possible
CPUs
-error message cleanup
-updated MAINTAINERS file with proper location for both fsl-mc bus
driver and dpio driver

Ioana Radulescu (1):
bus: fsl-mc: dpio: add APIs for DPIO objects

Roy Pledge (6):
bus: fsl-mc: dpio: add frame descriptor and scatter/gather APIs
bus: fsl-mc: dpio: add global dpaa2 definitions
bus: fsl-mc: dpio: add QBMan portal APIs for DPAA2
bus: fsl-mc: dpio: add the DPAA2 DPIO service interface
bus: fsl-mc: dpio: add the DPAA2 DPIO object driver
bus: fsl-mc: dpio: add maintainer for DPIO

Stuart Yoder (2):
staging: fsl-mc: move bus driver out of staging
bus: fsl-mc: dpio: add DPIO driver overview document

Documentation/dpaa2/dpio-driver.txt | 135 +++
.../README.txt => Documentation/dpaa2/overview.txt | 0
MAINTAINERS | 8 +-
drivers/bus/Kconfig | 3 +
drivers/bus/Makefile | 3 +
drivers/{staging/fsl-mc/bus => bus/fsl-mc}/Kconfig | 10 +
.../{staging/fsl-mc/bus => bus/fsl-mc}/Makefile | 4 +-
.../{staging/fsl-mc/bus => bus/fsl-mc}/dpbp-cmd.h | 0
drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpbp.c | 6 +-
.../{staging/fsl-mc/bus => bus/fsl-mc}/dpcon-cmd.h | 0
drivers/bus/fsl-mc/dpio/Makefile | 9 +
drivers/bus/fsl-mc/dpio/dpio-cmd.h | 75 ++
drivers/bus/fsl-mc/dpio/dpio-driver.c | 295 ++++++
drivers/bus/fsl-mc/dpio/dpio-service.c | 614 ++++++++++++
drivers/bus/fsl-mc/dpio/dpio.c | 229 +++++
drivers/bus/fsl-mc/dpio/dpio.h | 108 ++
drivers/bus/fsl-mc/dpio/qbman-portal.c | 1028 ++++++++++++++++++++
drivers/bus/fsl-mc/dpio/qbman-portal.h | 464 +++++++++
.../{staging/fsl-mc/bus => bus/fsl-mc}/dpmcp-cmd.h | 0
drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpmcp.c | 5 +-
drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpmcp.h | 0
.../{staging/fsl-mc/bus => bus/fsl-mc}/dpmng-cmd.h | 0
drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpmng.c | 6 +-
.../{staging/fsl-mc/bus => bus/fsl-mc}/dprc-cmd.h | 0
.../fsl-mc/bus => bus/fsl-mc}/dprc-driver.c | 4 +-
drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dprc.c | 6 +-
.../fsl-mc/bus => bus/fsl-mc}/fsl-mc-allocator.c | 4 +-
.../fsl-mc/bus => bus/fsl-mc}/fsl-mc-bus.c | 6 +-
.../fsl-mc/bus => bus/fsl-mc}/fsl-mc-msi.c | 2 +-
.../fsl-mc/bus => bus/fsl-mc}/fsl-mc-private.h | 4 +-
drivers/{staging/fsl-mc/bus => bus/fsl-mc}/mc-io.c | 4 +-
.../{staging/fsl-mc/bus => bus/fsl-mc}/mc-sys.c | 6 +-
drivers/irqchip/Makefile | 1 +
.../bus => irqchip}/irq-gic-v3-its-fsl-mc-msi.c | 2 +-
drivers/staging/Kconfig | 2 -
drivers/staging/Makefile | 1 -
drivers/staging/fsl-mc/Kconfig | 1 -
drivers/staging/fsl-mc/Makefile | 2 -
drivers/staging/fsl-mc/TODO | 18 -
include/linux/fsl/dpaa2-fd.h | 448 +++++++++
include/linux/fsl/dpaa2-global.h | 203 ++++
include/linux/fsl/dpaa2-io.h | 138 +++
.../fsl-mc/include => include/linux/fsl}/dpbp.h | 0
.../fsl-mc/include => include/linux/fsl}/dpmng.h | 0
.../fsl-mc/include => include/linux/fsl}/dprc.h | 0
.../fsl-mc/include => include/linux/fsl}/mc-bus.h | 2 +-
.../fsl-mc/include => include/linux/fsl}/mc-cmd.h | 0
.../fsl-mc/include => include/linux/fsl}/mc-sys.h | 0
.../fsl-mc/include => include/linux/fsl}/mc.h | 2 +-
49 files changed, 3803 insertions(+), 55 deletions(-)
create mode 100644 Documentation/dpaa2/dpio-driver.txt
rename drivers/staging/fsl-mc/README.txt => Documentation/dpaa2/overview.txt (100%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/Kconfig (56%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/Makefile (88%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpbp-cmd.h (100%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpbp.c (99%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpcon-cmd.h (100%)
create mode 100644 drivers/bus/fsl-mc/dpio/Makefile
create mode 100644 drivers/bus/fsl-mc/dpio/dpio-cmd.h
create mode 100644 drivers/bus/fsl-mc/dpio/dpio-driver.c
create mode 100644 drivers/bus/fsl-mc/dpio/dpio-service.c
create mode 100644 drivers/bus/fsl-mc/dpio/dpio.c
create mode 100644 drivers/bus/fsl-mc/dpio/dpio.h
create mode 100644 drivers/bus/fsl-mc/dpio/qbman-portal.c
create mode 100644 drivers/bus/fsl-mc/dpio/qbman-portal.h
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpmcp-cmd.h (100%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpmcp.c (99%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpmcp.h (100%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpmng-cmd.h (100%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpmng.c (96%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dprc-cmd.h (100%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dprc-driver.c (99%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dprc.c (99%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/fsl-mc-allocator.c (99%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/fsl-mc-bus.c (99%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/fsl-mc-msi.c (99%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/fsl-mc-private.h (96%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/mc-io.c (99%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/mc-sys.c (99%)
rename drivers/{staging/fsl-mc/bus => irqchip}/irq-gic-v3-its-fsl-mc-msi.c (99%)
delete mode 100644 drivers/staging/fsl-mc/Kconfig
delete mode 100644 drivers/staging/fsl-mc/Makefile
delete mode 100644 drivers/staging/fsl-mc/TODO
create mode 100644 include/linux/fsl/dpaa2-fd.h
create mode 100644 include/linux/fsl/dpaa2-global.h
create mode 100644 include/linux/fsl/dpaa2-io.h
rename {drivers/staging/fsl-mc/include => include/linux/fsl}/dpbp.h (100%)
rename {drivers/staging/fsl-mc/include => include/linux/fsl}/dpmng.h (100%)
rename {drivers/staging/fsl-mc/include => include/linux/fsl}/dprc.h (100%)
rename {drivers/staging/fsl-mc/include => include/linux/fsl}/mc-bus.h (99%)
rename {drivers/staging/fsl-mc/include => include/linux/fsl}/mc-cmd.h (100%)
rename {drivers/staging/fsl-mc/include => include/linux/fsl}/mc-sys.h (100%)
rename {drivers/staging/fsl-mc/include => include/linux/fsl}/mc.h (99%)

--
1.9.0