2017-06-08 14:29:11

by Laurentiu Tudor

[permalink] [raw]
Subject: [PATCH v7 00/10] staging: fsl-mc: move bus driver out of staging

From: Laurentiu Tudor <[email protected]>

Now that there is a functional ethernet driver probed on the
mc bus this patch series 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 the already existing include/linux/fsl.

First couple of patches fix several checkpatch.pl and README issues
and the last patch moves the bus out of staging, updating all
the users (e.g. #include paths).

Based on:
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git, staging-next

Link to previous version:
http://www.mail-archive.com/[email protected]/msg1409293.html

Link to last round of driver model fixes & cleanups:
https://lkml.org/lkml/2017/2/1/235

version 7 changes
- rewrapped commit comments to 72 columns (GregKH)
- corrected versioning (GregKH)

version 6 changes
- split patch containing multiple checkpatch.pl fixes into distinct patches (GregKH)
- fix couple submission issues (GregKH)
- reverted version bump on patches that weren't actually changed
- fix version prefix

version 5 changes
- drop restool utility reference from README (Marc Zyngier)
- add binding path in README (Marc Zyngier)

version 4 changes
- rebased on latest staging-next
- dpio was submitted separately so dropped from the series
- several checkpatch.pl --strict fixes (first 2 patches)
- update existing dpaa2 drivers to match the new fsl-mc bus location

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

Laurentiu Tudor (9):
staging: fsl-mc: enclose macro params in parens
staging: fsl-mc: fix macros with possible side effects
staging: fsl-mc: simplify couple of deallocations
staging: fsl-mc: drop a few useless #includes
staging: fsl-mc: remove extra blank line
staging: fsl-mc: drop unused forward declaration
staging: fsl-mc: add binding path to MAINTAINERS
staging: fsl-mc: drop reference to restool
staging: fsl-mc: add reference to mc-bus DT binding

Stuart Yoder (1):
staging: fsl-mc: move bus driver out of staging

.../README.txt => Documentation/dpaa2/overview.txt | 6 +++---
MAINTAINERS | 3 ++-
drivers/bus/Kconfig | 2 ++
drivers/bus/Makefile | 3 +++
drivers/bus/fsl-mc/Kconfig | 17 +++++++++++++++++
drivers/bus/fsl-mc/Makefile | 19 +++++++++++++++++++
drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpbp-cmd.h | 2 +-
drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpbp.c | 6 +++---
.../{staging/fsl-mc/bus => bus/fsl-mc}/dpmcp-cmd.h | 2 +-
drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpmcp.c | 4 ++--
drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpmcp.h | 0
.../{staging/fsl-mc/bus => bus/fsl-mc}/dpmng-cmd.h | 2 +-
drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpmng.c | 6 +++---
drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dprc-cmd.h | 2 +-
.../{staging/fsl-mc/bus => bus/fsl-mc}/dprc-driver.c | 14 +++++++++-----
drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dprc.c | 6 +++---
.../fsl-mc/bus => bus/fsl-mc}/fsl-mc-allocator.c | 17 ++++++++++-------
.../{staging/fsl-mc/bus => bus/fsl-mc}/fsl-mc-bus.c | 18 ++++++------------
.../{staging/fsl-mc/bus => bus/fsl-mc}/fsl-mc-msi.c | 4 +++-
.../fsl-mc/bus => bus/fsl-mc}/fsl-mc-private.h | 3 +--
drivers/{staging/fsl-mc/bus => bus/fsl-mc}/mc-io.c | 5 +++--
drivers/{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 | 3 +--
drivers/staging/fsl-dpaa2/ethernet/README | 2 +-
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 4 ++--
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 2 +-
drivers/staging/fsl-dpaa2/ethernet/dpni.c | 4 ++--
drivers/staging/fsl-mc/TODO | 18 ------------------
drivers/staging/fsl-mc/bus/Kconfig | 10 ----------
drivers/staging/fsl-mc/bus/Makefile | 15 +--------------
drivers/staging/fsl-mc/bus/dpcon.c | 8 ++++----
drivers/staging/fsl-mc/bus/dpio/dpio-driver.c | 2 +-
drivers/staging/fsl-mc/bus/dpio/dpio-service.c | 2 +-
drivers/staging/fsl-mc/bus/dpio/dpio.c | 4 ++--
.../fsl-mc/include => include/linux/fsl}/dpbp.h | 0
.../fsl-mc/bus => include/linux/fsl}/dpcon-cmd.h | 0
.../fsl-mc/include => include/linux/fsl}/dpmng.h | 0
.../fsl-mc/include => include/linux/fsl}/dprc.h | 4 ----
.../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 | 1 -
.../staging/fsl-mc/include => include/linux/fsl}/mc.h | 2 +-
43 files changed, 115 insertions(+), 116 deletions(-)
rename drivers/staging/fsl-mc/README.txt => Documentation/dpaa2/overview.txt (99%)
create mode 100644 drivers/bus/fsl-mc/Kconfig
create mode 100644 drivers/bus/fsl-mc/Makefile
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpbp-cmd.h (97%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpbp.c (98%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpmcp-cmd.h (96%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpmcp.c (98%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpmcp.h (100%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpmng-cmd.h (96%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpmng.c (96%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dprc-cmd.h (99%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dprc-driver.c (98%)
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 (98%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/fsl-mc-bus.c (98%)
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 (98%)
delete mode 100644 drivers/staging/fsl-mc/TODO
rename {drivers/staging/fsl-mc/include => include/linux/fsl}/dpbp.h (100%)
rename {drivers/staging/fsl-mc/bus => include/linux/fsl}/dpcon-cmd.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 (99%)
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 (99%)
rename {drivers/staging/fsl-mc/include => include/linux/fsl}/mc.h (99%)

--
2.9.4


2017-06-08 14:29:28

by Laurentiu Tudor

[permalink] [raw]
Subject: [PATCH v7 04/10] staging: fsl-mc: drop a few useless #includes

From: Laurentiu Tudor <[email protected]>

Some #includes were needlessly done from header files. Drop them from
there and update the only .c file that implicitly needed one of those
#includes.

Signed-off-by: Laurentiu Tudor <[email protected]>
---

Notes:
-v7
-rewrapped commit message

drivers/staging/fsl-mc/bus/fsl-mc-msi.c | 1 +
drivers/staging/fsl-mc/bus/fsl-mc-private.h | 1 -
drivers/staging/fsl-mc/include/dprc.h | 2 --
3 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-msi.c b/drivers/staging/fsl-mc/bus/fsl-mc-msi.c
index b8b2c86..a92fa5a 100644
--- a/drivers/staging/fsl-mc/bus/fsl-mc-msi.c
+++ b/drivers/staging/fsl-mc/bus/fsl-mc-msi.c
@@ -17,6 +17,7 @@
#include <linux/irqdomain.h>
#include <linux/msi.h>
#include "../include/mc-bus.h"
+#include "../include/mc-cmd.h"
#include "fsl-mc-private.h"

/*
diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-private.h b/drivers/staging/fsl-mc/bus/fsl-mc-private.h
index 5c49c9d..01ef9329 100644
--- a/drivers/staging/fsl-mc/bus/fsl-mc-private.h
+++ b/drivers/staging/fsl-mc/bus/fsl-mc-private.h
@@ -11,7 +11,6 @@
#define _FSL_MC_PRIVATE_H_

#include "../include/mc.h"
-#include "../include/mc-bus.h"

int __must_check fsl_mc_device_add(struct dprc_obj_desc *obj_desc,
struct fsl_mc_io *mc_io,
diff --git a/drivers/staging/fsl-mc/include/dprc.h b/drivers/staging/fsl-mc/include/dprc.h
index dc985cc..8498a5e 100644
--- a/drivers/staging/fsl-mc/include/dprc.h
+++ b/drivers/staging/fsl-mc/include/dprc.h
@@ -33,8 +33,6 @@
#ifndef _FSL_DPRC_H
#define _FSL_DPRC_H

-#include "mc-cmd.h"
-
/*
* Data Path Resource Container API
* Contains DPRC API for managing and querying DPAA resources
--
2.9.4

2017-06-08 14:29:39

by Laurentiu Tudor

[permalink] [raw]
Subject: [PATCH v7 05/10] staging: fsl-mc: remove extra blank line

From: Laurentiu Tudor <[email protected]>

Remove extra blank line reported by checkpatch.pl.

Signed-off-by: Laurentiu Tudor <[email protected]>
---

Notes:
-v7
-no changes

drivers/staging/fsl-mc/include/dprc.h | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/staging/fsl-mc/include/dprc.h b/drivers/staging/fsl-mc/include/dprc.h
index 8498a5e..2f4a7a7 100644
--- a/drivers/staging/fsl-mc/include/dprc.h
+++ b/drivers/staging/fsl-mc/include/dprc.h
@@ -49,7 +49,6 @@ int dprc_close(struct fsl_mc_io *mc_io,
u32 cmd_flags,
u16 token);

-
/* IRQ */

/* IRQ index */
--
2.9.4

2017-06-08 14:30:01

by Laurentiu Tudor

[permalink] [raw]
Subject: [PATCH v7 10/10] staging: fsl-mc: move bus driver out of staging

From: Stuart Yoder <[email protected]>

Move the source files out of staging into their final locations:
-include files in drivers/staging/fsl-mc/include go to include/linux/fsl
-irq-gic-v3-its-fsl-mc-msi.c goes to drivers/irqchip
-source in drivers/staging/fsl-mc/bus goes to drivers/bus/fsl-mc
-README.txt, providing and overview of DPAA goes to
Documentation/dpaa2/overview.txt

Update or delete other remaining staging files-- Makefile, Kconfig, TODO.
Update dpaa2_eth and dpio staging drivers.

Signed-off-by: Stuart Yoder <[email protected]>
Signed-off-by: Laurentiu Tudor <[email protected]>
[Laurentiu: rebased, add dpaa2_eth and dpio #include updates]
Cc: Thomas Gleixner <[email protected]>
Cc: Jason Cooper <[email protected]>
Cc: Marc Zyngier <[email protected]>
---

Notes:
-v7
-no changes
-v4
-rebased
-update existing dpaa2 drivers to work with the bus out of staging
-v3
-no changes
-v2
-updated MAINTAINERS with new location

.../README.txt => Documentation/dpaa2/overview.txt | 0
MAINTAINERS | 2 +-
drivers/bus/Kconfig | 2 ++
drivers/bus/Makefile | 3 +++
drivers/bus/fsl-mc/Kconfig | 17 +++++++++++++++++
drivers/bus/fsl-mc/Makefile | 19 +++++++++++++++++++
drivers/{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}/dpmcp-cmd.h | 0
drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpmcp.c | 4 ++--
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 +++---
drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dprc-cmd.h | 0
.../{staging/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 | 6 +++---
.../{staging/fsl-mc/bus => bus/fsl-mc}/fsl-mc-bus.c | 6 +++---
.../{staging/fsl-mc/bus => bus/fsl-mc}/fsl-mc-msi.c | 5 +++--
.../fsl-mc/bus => bus/fsl-mc}/fsl-mc-private.h | 2 +-
drivers/{staging/fsl-mc/bus => bus/fsl-mc}/mc-io.c | 5 +++--
drivers/{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 | 3 +--
drivers/staging/fsl-dpaa2/ethernet/README | 2 +-
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 4 ++--
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 2 +-
drivers/staging/fsl-dpaa2/ethernet/dpni.c | 4 ++--
drivers/staging/fsl-mc/TODO | 18 ------------------
drivers/staging/fsl-mc/bus/Kconfig | 10 ----------
drivers/staging/fsl-mc/bus/Makefile | 15 +--------------
drivers/staging/fsl-mc/bus/dpcon.c | 8 ++++----
drivers/staging/fsl-mc/bus/dpio/dpio-driver.c | 2 +-
drivers/staging/fsl-mc/bus/dpio/dpio-service.c | 2 +-
drivers/staging/fsl-mc/bus/dpio/dpio.c | 4 ++--
.../fsl-mc/include => include/linux/fsl}/dpbp.h | 0
.../fsl-mc/bus => include/linux/fsl}/dpcon-cmd.h | 0
.../fsl-mc/include => include/linux/fsl}/dpmng.h | 0
.../fsl-mc/include => include/linux/fsl}/dprc.h | 1 -
.../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
.../staging/fsl-mc/include => include/linux/fsl}/mc.h | 2 +-
43 files changed, 90 insertions(+), 89 deletions(-)
rename drivers/staging/fsl-mc/README.txt => Documentation/dpaa2/overview.txt (100%)
create mode 100644 drivers/bus/fsl-mc/Kconfig
create mode 100644 drivers/bus/fsl-mc/Makefile
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpbp-cmd.h (100%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpbp.c (98%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpmcp-cmd.h (100%)
rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpmcp.c (98%)
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 (98%)
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 (98%)
delete mode 100644 drivers/staging/fsl-mc/TODO
rename {drivers/staging/fsl-mc/include => include/linux/fsl}/dpbp.h (100%)
rename {drivers/staging/fsl-mc/bus => include/linux/fsl}/dpcon-cmd.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 (99%)
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%)

diff --git a/drivers/staging/fsl-mc/README.txt b/Documentation/dpaa2/overview.txt
similarity index 100%
rename from drivers/staging/fsl-mc/README.txt
rename to Documentation/dpaa2/overview.txt
diff --git a/MAINTAINERS b/MAINTAINERS
index ffac090..4bc71be 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -10544,7 +10544,7 @@ M: Stuart Yoder <[email protected]>
M: Laurentiu Tudor <[email protected]>
L: [email protected]
S: Maintained
-F: drivers/staging/fsl-mc/
+F: drivers/bus/fsl-mc/
F: Documentation/devicetree/bindings/misc/fsl,qoriq-mc.txt

QT1010 MEDIA DRIVER
diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig
index 0a52da4..dbb1f44 100644
--- a/drivers/bus/Kconfig
+++ b/drivers/bus/Kconfig
@@ -184,4 +184,6 @@ config DA8XX_MSTPRI
configuration. Allows to adjust the priorities of all master
peripherals.

+source "drivers/bus/fsl-mc/Kconfig"
+
endmenu
diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile
index cc6364b..dee9a84 100644
--- a/drivers/bus/Makefile
+++ b/drivers/bus/Makefile
@@ -14,6 +14,9 @@ obj-$(CONFIG_MVEBU_MBUS) += mvebu-mbus.o
# Interconnect bus driver for OMAP SoCs.
obj-$(CONFIG_OMAP_INTERCONNECT) += omap_l3_smx.o omap_l3_noc.o

+# DPAA2 fsl-mc bus
+obj-$(CONFIG_FSL_MC_BUS) += fsl-mc/
+
obj-$(CONFIG_OMAP_OCP2SCP) += omap-ocp2scp.o
obj-$(CONFIG_QCOM_EBI2) += qcom-ebi2.o
obj-$(CONFIG_SUNXI_RSB) += sunxi-rsb.o
diff --git a/drivers/bus/fsl-mc/Kconfig b/drivers/bus/fsl-mc/Kconfig
new file mode 100644
index 0000000..5c009ab
--- /dev/null
+++ b/drivers/bus/fsl-mc/Kconfig
@@ -0,0 +1,17 @@
+#
+# DPAA2 fsl-mc bus
+#
+# Copyright (C) 2014-2016 Freescale Semiconductor, Inc.
+#
+# This file is released under the GPLv2
+#
+
+config FSL_MC_BUS
+ bool "QorIQ DPAA2 fsl-mc bus driver"
+ depends on OF && ARCH_LAYERSCAPE
+ select GENERIC_MSI_IRQ_DOMAIN
+ help
+ Driver to enable the bus infrastructure for the QorIQ DPAA2
+ architecture. The fsl-mc bus driver handles discovery of
+ DPAA2 objects (which are represented as Linux devices) and
+ binding objects to drivers.
diff --git a/drivers/bus/fsl-mc/Makefile b/drivers/bus/fsl-mc/Makefile
new file mode 100644
index 0000000..d56afee
--- /dev/null
+++ b/drivers/bus/fsl-mc/Makefile
@@ -0,0 +1,19 @@
+#
+# Freescale Management Complex (MC) bus drivers
+#
+# Copyright (C) 2014 Freescale Semiconductor, Inc.
+#
+# This file is released under the GPLv2
+#
+obj-$(CONFIG_FSL_MC_BUS) += mc-bus-driver.o
+
+mc-bus-driver-objs := fsl-mc-bus.o \
+ mc-sys.o \
+ mc-io.o \
+ dprc.o \
+ dpmng.o \
+ dprc-driver.o \
+ fsl-mc-allocator.o \
+ fsl-mc-msi.o \
+ dpmcp.o \
+ dpbp.o
diff --git a/drivers/staging/fsl-mc/bus/dpbp-cmd.h b/drivers/bus/fsl-mc/dpbp-cmd.h
similarity index 100%
rename from drivers/staging/fsl-mc/bus/dpbp-cmd.h
rename to drivers/bus/fsl-mc/dpbp-cmd.h
diff --git a/drivers/staging/fsl-mc/bus/dpbp.c b/drivers/bus/fsl-mc/dpbp.c
similarity index 98%
rename from drivers/staging/fsl-mc/bus/dpbp.c
rename to drivers/bus/fsl-mc/dpbp.c
index d9e450a..3a7bc3d 100644
--- a/drivers/staging/fsl-mc/bus/dpbp.c
+++ b/drivers/bus/fsl-mc/dpbp.c
@@ -29,9 +29,9 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "../include/mc-sys.h"
-#include "../include/mc-cmd.h"
-#include "../include/dpbp.h"
+#include <linux/fsl/mc-sys.h>
+#include <linux/fsl/mc-cmd.h>
+#include <linux/fsl/dpbp.h>

#include "dpbp-cmd.h"

diff --git a/drivers/staging/fsl-mc/bus/dpmcp-cmd.h b/drivers/bus/fsl-mc/dpmcp-cmd.h
similarity index 100%
rename from drivers/staging/fsl-mc/bus/dpmcp-cmd.h
rename to drivers/bus/fsl-mc/dpmcp-cmd.h
diff --git a/drivers/staging/fsl-mc/bus/dpmcp.c b/drivers/bus/fsl-mc/dpmcp.c
similarity index 98%
rename from drivers/staging/fsl-mc/bus/dpmcp.c
rename to drivers/bus/fsl-mc/dpmcp.c
index ad4c8b4..5c5c2aa 100644
--- a/drivers/staging/fsl-mc/bus/dpmcp.c
+++ b/drivers/bus/fsl-mc/dpmcp.c
@@ -29,8 +29,8 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "../include/mc-sys.h"
-#include "../include/mc-cmd.h"
+#include <linux/fsl/mc-sys.h>
+#include <linux/fsl/mc-cmd.h>

#include "dpmcp.h"
#include "dpmcp-cmd.h"
diff --git a/drivers/staging/fsl-mc/bus/dpmcp.h b/drivers/bus/fsl-mc/dpmcp.h
similarity index 100%
rename from drivers/staging/fsl-mc/bus/dpmcp.h
rename to drivers/bus/fsl-mc/dpmcp.h
diff --git a/drivers/staging/fsl-mc/bus/dpmng-cmd.h b/drivers/bus/fsl-mc/dpmng-cmd.h
similarity index 100%
rename from drivers/staging/fsl-mc/bus/dpmng-cmd.h
rename to drivers/bus/fsl-mc/dpmng-cmd.h
diff --git a/drivers/staging/fsl-mc/bus/dpmng.c b/drivers/bus/fsl-mc/dpmng.c
similarity index 96%
rename from drivers/staging/fsl-mc/bus/dpmng.c
rename to drivers/bus/fsl-mc/dpmng.c
index ad5d5bb..312fa0ee 100644
--- a/drivers/staging/fsl-mc/bus/dpmng.c
+++ b/drivers/bus/fsl-mc/dpmng.c
@@ -29,9 +29,9 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "../include/mc-sys.h"
-#include "../include/mc-cmd.h"
-#include "../include/dpmng.h"
+#include <linux/fsl/mc-sys.h>
+#include <linux/fsl/mc-cmd.h>
+#include <linux/fsl/dpmng.h>

#include "dpmng-cmd.h"

diff --git a/drivers/staging/fsl-mc/bus/dprc-cmd.h b/drivers/bus/fsl-mc/dprc-cmd.h
similarity index 100%
rename from drivers/staging/fsl-mc/bus/dprc-cmd.h
rename to drivers/bus/fsl-mc/dprc-cmd.h
diff --git a/drivers/staging/fsl-mc/bus/dprc-driver.c b/drivers/bus/fsl-mc/dprc-driver.c
similarity index 99%
rename from drivers/staging/fsl-mc/bus/dprc-driver.c
rename to drivers/bus/fsl-mc/dprc-driver.c
index 39c9a3b..2a392fd 100644
--- a/drivers/staging/fsl-mc/bus/dprc-driver.c
+++ b/drivers/bus/fsl-mc/dprc-driver.c
@@ -13,8 +13,8 @@
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/msi.h>
-#include "../include/mc-bus.h"
-#include "../include/mc-sys.h"
+#include <linux/fsl/mc-bus.h>
+#include <linux/fsl/mc-sys.h>

#include "dprc-cmd.h"
#include "fsl-mc-private.h"
diff --git a/drivers/staging/fsl-mc/bus/dprc.c b/drivers/bus/fsl-mc/dprc.c
similarity index 99%
rename from drivers/staging/fsl-mc/bus/dprc.c
rename to drivers/bus/fsl-mc/dprc.c
index fcf7b47..069e4dd 100644
--- a/drivers/staging/fsl-mc/bus/dprc.c
+++ b/drivers/bus/fsl-mc/dprc.c
@@ -29,9 +29,9 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "../include/mc-sys.h"
-#include "../include/mc-cmd.h"
-#include "../include/dprc.h"
+#include <linux/fsl/mc-sys.h>
+#include <linux/fsl/mc-cmd.h>
+#include <linux/fsl/dprc.h>

#include "dprc-cmd.h"

diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c b/drivers/bus/fsl-mc/fsl-mc-allocator.c
similarity index 99%
rename from drivers/staging/fsl-mc/bus/fsl-mc-allocator.c
rename to drivers/bus/fsl-mc/fsl-mc-allocator.c
index d3def40..5ea3b26 100644
--- a/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c
+++ b/drivers/bus/fsl-mc/fsl-mc-allocator.c
@@ -10,11 +10,11 @@

#include <linux/module.h>
#include <linux/msi.h>
-#include "../include/mc-bus.h"
-#include "../include/mc-sys.h"
+#include <linux/fsl/mc-bus.h>
+#include <linux/fsl/mc-sys.h>
+#include <linux/fsl/dpcon-cmd.h>

#include "dpbp-cmd.h"
-#include "dpcon-cmd.h"
#include "fsl-mc-private.h"

#define FSL_MC_IS_ALLOCATABLE(_obj_type) \
diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bus.c
similarity index 99%
rename from drivers/staging/fsl-mc/bus/fsl-mc-bus.c
rename to drivers/bus/fsl-mc/fsl-mc-bus.c
index 7b48ade..f59aa9f 100644
--- a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c
+++ b/drivers/bus/fsl-mc/fsl-mc-bus.c
@@ -20,9 +20,9 @@
#include <linux/bitops.h>
#include <linux/msi.h>
#include <linux/dma-mapping.h>
-#include "../include/mc-bus.h"
-#include "../include/dpmng.h"
-#include "../include/mc-sys.h"
+#include <linux/fsl/mc-bus.h>
+#include <linux/fsl/dpmng.h>
+#include <linux/fsl/mc-sys.h>

#include "fsl-mc-private.h"
#include "dprc-cmd.h"
diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-msi.c b/drivers/bus/fsl-mc/fsl-mc-msi.c
similarity index 99%
rename from drivers/staging/fsl-mc/bus/fsl-mc-msi.c
rename to drivers/bus/fsl-mc/fsl-mc-msi.c
index a92fa5a..42314b3 100644
--- a/drivers/staging/fsl-mc/bus/fsl-mc-msi.c
+++ b/drivers/bus/fsl-mc/fsl-mc-msi.c
@@ -16,8 +16,9 @@
#include <linux/irq.h>
#include <linux/irqdomain.h>
#include <linux/msi.h>
-#include "../include/mc-bus.h"
-#include "../include/mc-cmd.h"
+#include <linux/fsl/mc-bus.h>
+#include <linux/fsl/mc-cmd.h>
+
#include "fsl-mc-private.h"

/*
diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-private.h b/drivers/bus/fsl-mc/fsl-mc-private.h
similarity index 98%
rename from drivers/staging/fsl-mc/bus/fsl-mc-private.h
rename to drivers/bus/fsl-mc/fsl-mc-private.h
index 01ef9329..8912d19 100644
--- a/drivers/staging/fsl-mc/bus/fsl-mc-private.h
+++ b/drivers/bus/fsl-mc/fsl-mc-private.h
@@ -10,7 +10,7 @@
#ifndef _FSL_MC_PRIVATE_H_
#define _FSL_MC_PRIVATE_H_

-#include "../include/mc.h"
+#include <linux/fsl/mc.h>

int __must_check fsl_mc_device_add(struct dprc_obj_desc *obj_desc,
struct fsl_mc_io *mc_io,
diff --git a/drivers/staging/fsl-mc/bus/mc-io.c b/drivers/bus/fsl-mc/mc-io.c
similarity index 99%
rename from drivers/staging/fsl-mc/bus/mc-io.c
rename to drivers/bus/fsl-mc/mc-io.c
index d66b87f..a24c11d 100644
--- a/drivers/staging/fsl-mc/bus/mc-io.c
+++ b/drivers/bus/fsl-mc/mc-io.c
@@ -31,8 +31,9 @@
*/

#include <linux/io.h>
-#include "../include/mc-bus.h"
-#include "../include/mc-sys.h"
+#include <linux/fsl/mc-bus.h>
+#include <linux/fsl/mc-sys.h>
+#include <linux/fsl/mc-cmd.h>

#include "fsl-mc-private.h"
#include "dpmcp.h"
diff --git a/drivers/staging/fsl-mc/bus/mc-sys.c b/drivers/bus/fsl-mc/mc-sys.c
similarity index 99%
rename from drivers/staging/fsl-mc/bus/mc-sys.c
rename to drivers/bus/fsl-mc/mc-sys.c
index 4d82802..ac86226 100644
--- a/drivers/staging/fsl-mc/bus/mc-sys.c
+++ b/drivers/bus/fsl-mc/mc-sys.c
@@ -37,9 +37,9 @@
#include <linux/ioport.h>
#include <linux/device.h>
#include <linux/io.h>
-#include "../include/mc-sys.h"
-#include "../include/mc-cmd.h"
-#include "../include/mc.h"
+#include <linux/fsl/mc-sys.h>
+#include <linux/fsl/mc-cmd.h>
+#include <linux/fsl/mc.h>

#include "dpmcp.h"

diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
index b64c59b..6cc4c26 100644
--- a/drivers/irqchip/Makefile
+++ b/drivers/irqchip/Makefile
@@ -76,3 +76,4 @@ obj-$(CONFIG_EZNPS_GIC) += irq-eznps.o
obj-$(CONFIG_ARCH_ASPEED) += irq-aspeed-vic.o
obj-$(CONFIG_STM32_EXTI) += irq-stm32-exti.o
obj-$(CONFIG_QCOM_IRQ_COMBINER) += qcom-irq-combiner.o
+obj-$(CONFIG_FSL_MC_BUS) += irq-gic-v3-its-fsl-mc-msi.o
diff --git a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c b/drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c
similarity index 98%
rename from drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c
rename to drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c
index 49127ac..63cdd63 100644
--- a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c
+++ b/drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c
@@ -16,8 +16,7 @@
#include <linux/msi.h>
#include <linux/of.h>
#include <linux/of_irq.h>
-#include "../include/mc-bus.h"
-#include "fsl-mc-private.h"
+#include <linux/fsl/mc-bus.h>

static struct irq_chip its_msi_irq_chip = {
.name = "ITS-fMSI",
diff --git a/drivers/staging/fsl-dpaa2/ethernet/README b/drivers/staging/fsl-dpaa2/ethernet/README
index 410952e..1e825df 100644
--- a/drivers/staging/fsl-dpaa2/ethernet/README
+++ b/drivers/staging/fsl-dpaa2/ethernet/README
@@ -36,7 +36,7 @@ are treated as internal resources of other objects.

For a more detailed description of the DPAA2 architecture and its object
abstractions see:
- drivers/staging/fsl-mc/README.txt
+ Documentation/dpaa2/overview.txt

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
diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
index 49c435b..f010821 100644
--- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
+++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
@@ -39,8 +39,8 @@
#include <linux/kthread.h>
#include <linux/iommu.h>

-#include "../../fsl-mc/include/mc.h"
-#include "../../fsl-mc/include/mc-sys.h"
+#include <linux/fsl/mc.h>
+#include <linux/fsl/mc-sys.h>
#include "dpaa2-eth.h"

/* CREATE_TRACE_POINTS only needs to be defined once. Other dpa files
diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h
index 55b4762..8d4e986 100644
--- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h
+++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h
@@ -38,7 +38,7 @@

#include "../../fsl-mc/include/dpaa2-io.h"
#include "../../fsl-mc/include/dpaa2-fd.h"
-#include "../../fsl-mc/include/dpbp.h"
+#include <linux/fsl/dpbp.h>
#include "../../fsl-mc/include/dpcon.h"
#include "dpni.h"
#include "dpni-cmd.h"
diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpni.c b/drivers/staging/fsl-dpaa2/ethernet/dpni.c
index cea46ed..4f758a9 100644
--- a/drivers/staging/fsl-dpaa2/ethernet/dpni.c
+++ b/drivers/staging/fsl-dpaa2/ethernet/dpni.c
@@ -30,8 +30,8 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "../../fsl-mc/include/mc-sys.h"
-#include "../../fsl-mc/include/mc-cmd.h"
+#include <linux/fsl/mc-sys.h>
+#include <linux/fsl/mc-cmd.h>
#include "dpni.h"
#include "dpni-cmd.h"

diff --git a/drivers/staging/fsl-mc/TODO b/drivers/staging/fsl-mc/TODO
deleted file mode 100644
index 54a8bc6..0000000
--- a/drivers/staging/fsl-mc/TODO
+++ /dev/null
@@ -1,18 +0,0 @@
-* Add at least one device driver for a DPAA2 object (child device of the
- fsl-mc bus). Most likely candidate for this is adding DPAA2 Ethernet
- driver support, which depends on drivers for several objects: DPNI,
- DPIO, DPMAC. Other pre-requisites include:
-
- * MC firmware uprev. The MC firmware upon which the fsl-mc
- bus driver and DPAA2 object drivers are based is continuing
- to evolve, so minor updates are needed to keep in sync with binary
- interface changes to the MC.
-
-* Cleanup
-
-Please send any patches to Greg Kroah-Hartman <[email protected]>,
[email protected], [email protected],
[email protected]
-
-[1] https://lkml.org/lkml/2015/7/9/93
-[2] https://lkml.org/lkml/2015/7/7/712
diff --git a/drivers/staging/fsl-mc/bus/Kconfig b/drivers/staging/fsl-mc/bus/Kconfig
index a10aaf0..0f75b56 100644
--- a/drivers/staging/fsl-mc/bus/Kconfig
+++ b/drivers/staging/fsl-mc/bus/Kconfig
@@ -6,16 +6,6 @@
# This file is released under the GPLv2
#

-config FSL_MC_BUS
- bool "QorIQ DPAA2 fsl-mc bus driver"
- depends on OF && ARCH_LAYERSCAPE
- select GENERIC_MSI_IRQ_DOMAIN
- help
- Driver to enable the bus infrastructure for the QorIQ DPAA2
- architecture. The fsl-mc bus driver handles discovery of
- DPAA2 objects (which are represented as Linux devices) and
- binding objects to drivers.
-
config FSL_MC_DPIO
tristate "QorIQ DPAA2 DPIO driver"
depends on FSL_MC_BUS
diff --git a/drivers/staging/fsl-mc/bus/Makefile b/drivers/staging/fsl-mc/bus/Makefile
index 659eccf..e86ad44 100644
--- a/drivers/staging/fsl-mc/bus/Makefile
+++ b/drivers/staging/fsl-mc/bus/Makefile
@@ -5,20 +5,7 @@
#
# This file is released under the GPLv2
#
-obj-$(CONFIG_FSL_MC_BUS) += mc-bus-driver.o
-
-mc-bus-driver-objs := fsl-mc-bus.o \
- mc-sys.o \
- mc-io.o \
- dprc.o \
- dpmng.o \
- dprc-driver.o \
- fsl-mc-allocator.o \
- fsl-mc-msi.o \
- irq-gic-v3-its-fsl-mc-msi.o \
- dpmcp.o \
- dpbp.o \
- dpcon.o
+obj-$(CONFIG_FSL_MC_BUS) += dpcon.o

# MC DPIO driver
obj-$(CONFIG_FSL_MC_DPIO) += dpio/
diff --git a/drivers/staging/fsl-mc/bus/dpcon.c b/drivers/staging/fsl-mc/bus/dpcon.c
index eb71357..abbc3c2 100644
--- a/drivers/staging/fsl-mc/bus/dpcon.c
+++ b/drivers/staging/fsl-mc/bus/dpcon.c
@@ -29,11 +29,11 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "../include/mc-sys.h"
-#include "../include/mc-cmd.h"
-#include "../include/dpcon.h"
+#include <linux/fsl/mc-sys.h>
+#include <linux/fsl/mc-cmd.h>
+#include <linux/fsl/dpcon-cmd.h>

-#include "dpcon-cmd.h"
+#include "../include/dpcon.h"

/**
* dpcon_open() - Open a control session for the specified object
diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio-driver.c b/drivers/staging/fsl-mc/bus/dpio/dpio-driver.c
index e36da20..6170547 100644
--- a/drivers/staging/fsl-mc/bus/dpio/dpio-driver.c
+++ b/drivers/staging/fsl-mc/bus/dpio/dpio-driver.c
@@ -38,8 +38,8 @@
#include <linux/msi.h>
#include <linux/dma-mapping.h>
#include <linux/delay.h>
+#include <linux/fsl/mc.h>

-#include "../../include/mc.h"
#include "../../include/dpaa2-io.h"

#include "qbman-portal.h"
diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio-service.c b/drivers/staging/fsl-mc/bus/dpio/dpio-service.c
index e5d6674..bb4a99f 100644
--- a/drivers/staging/fsl-mc/bus/dpio/dpio-service.c
+++ b/drivers/staging/fsl-mc/bus/dpio/dpio-service.c
@@ -30,7 +30,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <linux/types.h>
-#include "../../include/mc.h"
+#include <linux/fsl/mc.h>
#include "../../include/dpaa2-io.h"
#include <linux/init.h>
#include <linux/module.h>
diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio.c b/drivers/staging/fsl-mc/bus/dpio/dpio.c
index d81e023..b16a990 100644
--- a/drivers/staging/fsl-mc/bus/dpio/dpio.c
+++ b/drivers/staging/fsl-mc/bus/dpio/dpio.c
@@ -30,8 +30,8 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "../../include/mc-sys.h"
-#include "../../include/mc-cmd.h"
+#include <linux/fsl/mc-sys.h>
+#include <linux/fsl/mc-cmd.h>

#include "dpio.h"
#include "dpio-cmd.h"
diff --git a/drivers/staging/fsl-mc/include/dpbp.h b/include/linux/fsl/dpbp.h
similarity index 100%
rename from drivers/staging/fsl-mc/include/dpbp.h
rename to include/linux/fsl/dpbp.h
diff --git a/drivers/staging/fsl-mc/bus/dpcon-cmd.h b/include/linux/fsl/dpcon-cmd.h
similarity index 100%
rename from drivers/staging/fsl-mc/bus/dpcon-cmd.h
rename to include/linux/fsl/dpcon-cmd.h
diff --git a/drivers/staging/fsl-mc/include/dpmng.h b/include/linux/fsl/dpmng.h
similarity index 100%
rename from drivers/staging/fsl-mc/include/dpmng.h
rename to include/linux/fsl/dpmng.h
diff --git a/drivers/staging/fsl-mc/include/dprc.h b/include/linux/fsl/dprc.h
similarity index 99%
rename from drivers/staging/fsl-mc/include/dprc.h
rename to include/linux/fsl/dprc.h
index 2f4a7a7..135c87b 100644
--- a/drivers/staging/fsl-mc/include/dprc.h
+++ b/include/linux/fsl/dprc.h
@@ -305,4 +305,3 @@ int dprc_get_container_id(struct fsl_mc_io *mc_io,
int *container_id);

#endif /* _FSL_DPRC_H */
-
diff --git a/drivers/staging/fsl-mc/include/mc-bus.h b/include/linux/fsl/mc-bus.h
similarity index 99%
rename from drivers/staging/fsl-mc/include/mc-bus.h
rename to include/linux/fsl/mc-bus.h
index 42700de..23c06e1 100644
--- a/drivers/staging/fsl-mc/include/mc-bus.h
+++ b/include/linux/fsl/mc-bus.h
@@ -11,7 +11,7 @@
#ifndef _FSL_MC_MCBUS_H_
#define _FSL_MC_MCBUS_H_

-#include "../include/mc.h"
+#include <linux/fsl/mc.h>
#include <linux/mutex.h>

struct irq_domain;
diff --git a/drivers/staging/fsl-mc/include/mc-cmd.h b/include/linux/fsl/mc-cmd.h
similarity index 100%
rename from drivers/staging/fsl-mc/include/mc-cmd.h
rename to include/linux/fsl/mc-cmd.h
diff --git a/drivers/staging/fsl-mc/include/mc-sys.h b/include/linux/fsl/mc-sys.h
similarity index 100%
rename from drivers/staging/fsl-mc/include/mc-sys.h
rename to include/linux/fsl/mc-sys.h
diff --git a/drivers/staging/fsl-mc/include/mc.h b/include/linux/fsl/mc.h
similarity index 99%
rename from drivers/staging/fsl-mc/include/mc.h
rename to include/linux/fsl/mc.h
index 1c46c0c..929bfdb 100644
--- a/drivers/staging/fsl-mc/include/mc.h
+++ b/include/linux/fsl/mc.h
@@ -14,7 +14,7 @@
#include <linux/device.h>
#include <linux/mod_devicetable.h>
#include <linux/interrupt.h>
-#include "../include/dprc.h"
+#include <linux/fsl/dprc.h>

#define FSL_MC_VENDOR_FREESCALE 0x1957

--
2.9.4

2017-06-08 14:29:55

by Laurentiu Tudor

[permalink] [raw]
Subject: [PATCH v7 08/10] staging: fsl-mc: drop reference to restool

From: Laurentiu Tudor <[email protected]>

Drop reference to user space restool utility from the README.
It will be added back together with the actual support in the
bus driver.

Signed-off-by: Laurentiu Tudor <[email protected]>
---

Notes:
-v7
-no changes

drivers/staging/fsl-mc/README.txt | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/fsl-mc/README.txt b/drivers/staging/fsl-mc/README.txt
index 179536a..d7cd70a 100644
--- a/drivers/staging/fsl-mc/README.txt
+++ b/drivers/staging/fsl-mc/README.txt
@@ -131,9 +131,7 @@ in creating a network interfaces.

DPRCs can be defined statically and populated with objects
via a config file passed to the MC when firmware starts
- it. There is also a Linux user space tool called "restool"
- that can be used to create/destroy containers and objects
- dynamically.
+ it.

-DPAA2 Objects for an Ethernet Network Interface

--
2.9.4

2017-06-08 14:29:52

by Laurentiu Tudor

[permalink] [raw]
Subject: [PATCH v7 09/10] staging: fsl-mc: add reference to mc-bus DT binding

From: Laurentiu Tudor <[email protected]>

Update README to reference the mc-bus device tree node binding.

Signed-off-by: Laurentiu Tudor <[email protected]>
---

Notes:
-v7
-rewrapped commit message

drivers/staging/fsl-mc/README.txt | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/staging/fsl-mc/README.txt b/drivers/staging/fsl-mc/README.txt
index d7cd70a..524eda1 100644
--- a/drivers/staging/fsl-mc/README.txt
+++ b/drivers/staging/fsl-mc/README.txt
@@ -320,6 +320,8 @@ A brief description of each driver is provided below.
-creates an MSI IRQ domain
-doing a 'device add' to expose the 'root' DPRC, in turn triggering
a bind of the root DPRC to the DPRC driver
+ The binding for the MC-bus device-tree node can be consulted here:
+ Documentation/devicetree/bindings/misc/fsl,qoriq-mc.txt

DPRC driver
-----------
--
2.9.4

2017-06-08 14:29:36

by Laurentiu Tudor

[permalink] [raw]
Subject: [PATCH v7 01/10] staging: fsl-mc: enclose macro params in parens

From: Laurentiu Tudor <[email protected]>

Several macros didn't had macro params enclosed in parens. Fix them to
avoid precedence issues. Found with checkpatch.pl who was issuing this
message:
"Macro argument 'id' may be better as '(id)' to avoid precedence
issues"

Signed-off-by: Laurentiu Tudor <[email protected]>
---

Notes:
-v7
-rewrapped commit message

drivers/staging/fsl-mc/bus/dpbp-cmd.h | 2 +-
drivers/staging/fsl-mc/bus/dpmcp-cmd.h | 2 +-
drivers/staging/fsl-mc/bus/dpmng-cmd.h | 2 +-
drivers/staging/fsl-mc/bus/dprc-cmd.h | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/fsl-mc/bus/dpbp-cmd.h b/drivers/staging/fsl-mc/bus/dpbp-cmd.h
index 8aa6545..5904836 100644
--- a/drivers/staging/fsl-mc/bus/dpbp-cmd.h
+++ b/drivers/staging/fsl-mc/bus/dpbp-cmd.h
@@ -40,7 +40,7 @@
#define DPBP_CMD_BASE_VERSION 1
#define DPBP_CMD_ID_OFFSET 4

-#define DPBP_CMD(id) ((id << DPBP_CMD_ID_OFFSET) | DPBP_CMD_BASE_VERSION)
+#define DPBP_CMD(id) (((id) << DPBP_CMD_ID_OFFSET) | DPBP_CMD_BASE_VERSION)

/* Command IDs */
#define DPBP_CMDID_CLOSE DPBP_CMD(0x800)
diff --git a/drivers/staging/fsl-mc/bus/dpmcp-cmd.h b/drivers/staging/fsl-mc/bus/dpmcp-cmd.h
index 384a13d..861b2a7 100644
--- a/drivers/staging/fsl-mc/bus/dpmcp-cmd.h
+++ b/drivers/staging/fsl-mc/bus/dpmcp-cmd.h
@@ -40,7 +40,7 @@
#define DPMCP_CMD_BASE_VERSION 1
#define DPMCP_CMD_ID_OFFSET 4

-#define DPMCP_CMD(id) ((id << DPMCP_CMD_ID_OFFSET) | DPMCP_CMD_BASE_VERSION)
+#define DPMCP_CMD(id) (((id) << DPMCP_CMD_ID_OFFSET) | DPMCP_CMD_BASE_VERSION)

/* Command IDs */
#define DPMCP_CMDID_CLOSE DPMCP_CMD(0x800)
diff --git a/drivers/staging/fsl-mc/bus/dpmng-cmd.h b/drivers/staging/fsl-mc/bus/dpmng-cmd.h
index cdddfb8..d1f04ac 100644
--- a/drivers/staging/fsl-mc/bus/dpmng-cmd.h
+++ b/drivers/staging/fsl-mc/bus/dpmng-cmd.h
@@ -44,7 +44,7 @@
#define DPMNG_CMD_BASE_VERSION 1
#define DPMNG_CMD_ID_OFFSET 4

-#define DPMNG_CMD(id) ((id << DPMNG_CMD_ID_OFFSET) | DPMNG_CMD_BASE_VERSION)
+#define DPMNG_CMD(id) (((id) << DPMNG_CMD_ID_OFFSET) | DPMNG_CMD_BASE_VERSION)

/* Command IDs */
#define DPMNG_CMDID_GET_VERSION DPMNG_CMD(0x831)
diff --git a/drivers/staging/fsl-mc/bus/dprc-cmd.h b/drivers/staging/fsl-mc/bus/dprc-cmd.h
index e9fdca4..d9b2dcd 100644
--- a/drivers/staging/fsl-mc/bus/dprc-cmd.h
+++ b/drivers/staging/fsl-mc/bus/dprc-cmd.h
@@ -48,7 +48,7 @@
#define DPRC_CMD_BASE_VERSION 1
#define DPRC_CMD_ID_OFFSET 4

-#define DPRC_CMD(id) ((id << DPRC_CMD_ID_OFFSET) | DPRC_CMD_BASE_VERSION)
+#define DPRC_CMD(id) (((id) << DPRC_CMD_ID_OFFSET) | DPRC_CMD_BASE_VERSION)

/* Command IDs */
#define DPRC_CMDID_CLOSE DPRC_CMD(0x800)
--
2.9.4

2017-06-08 14:30:42

by Laurentiu Tudor

[permalink] [raw]
Subject: [PATCH v7 07/10] staging: fsl-mc: add binding path to MAINTAINERS

From: Laurentiu Tudor <[email protected]>

The mc bus device tree binding is maintained but not mentioned in the
MAINTAINERS file. This patch adds it.

Signed-off-by: Laurentiu Tudor <[email protected]>
---

Notes:
-v7
-rewrapped commit message
-v2
-added commit description

MAINTAINERS | 1 +
1 file changed, 1 insertion(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 9e98464..ffac090 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -10545,6 +10545,7 @@ M: Laurentiu Tudor <[email protected]>
L: [email protected]
S: Maintained
F: drivers/staging/fsl-mc/
+F: Documentation/devicetree/bindings/misc/fsl,qoriq-mc.txt

QT1010 MEDIA DRIVER
M: Antti Palosaari <[email protected]>
--
2.9.4

2017-06-08 14:30:45

by Laurentiu Tudor

[permalink] [raw]
Subject: [PATCH v7 06/10] staging: fsl-mc: drop unused forward declaration

From: Laurentiu Tudor <[email protected]>

This forward declaration of "struct fsl_mc_resource" is of no use so
drop it.

Signed-off-by: Laurentiu Tudor <[email protected]>
---

Notes:
-v7
-rewrapped commit message

drivers/staging/fsl-mc/include/mc-sys.h | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/staging/fsl-mc/include/mc-sys.h b/drivers/staging/fsl-mc/include/mc-sys.h
index dca7f90..b520370 100644
--- a/drivers/staging/fsl-mc/include/mc-sys.h
+++ b/drivers/staging/fsl-mc/include/mc-sys.h
@@ -46,7 +46,6 @@
*/
#define FSL_MC_IO_ATOMIC_CONTEXT_PORTAL 0x0001

-struct fsl_mc_resource;
struct mc_command;

/**
--
2.9.4

2017-06-08 14:29:25

by Laurentiu Tudor

[permalink] [raw]
Subject: [PATCH v7 02/10] staging: fsl-mc: fix macros with possible side effects

From: Laurentiu Tudor <[email protected]>

Several macros were triggering this checkpatch.pl warning:
"Macro argument reuse '$arg' - possible side-effects?"
Fix the warning by avoiding multiple macro argument use.

Signed-off-by: Laurentiu Tudor <[email protected]>
---

Notes:
-v7
-no changes

drivers/staging/fsl-mc/bus/dprc-driver.c | 10 +++++++---
drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 11 +++++++----
2 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/fsl-mc/bus/dprc-driver.c b/drivers/staging/fsl-mc/bus/dprc-driver.c
index d723c69..39c9a3b 100644
--- a/drivers/staging/fsl-mc/bus/dprc-driver.c
+++ b/drivers/staging/fsl-mc/bus/dprc-driver.c
@@ -21,9 +21,13 @@

#define FSL_MC_DPRC_DRIVER_NAME "fsl_mc_dprc"

-#define FSL_MC_DEVICE_MATCH(_mc_dev, _obj_desc) \
- (strcmp((_mc_dev)->obj_desc.type, (_obj_desc)->type) == 0 && \
- (_mc_dev)->obj_desc.id == (_obj_desc)->id)
+#define FSL_MC_DEVICE_MATCH(_mc_dev, _obj_desc) \
+({ \
+ struct fsl_mc_device *__mc_dev = _mc_dev; \
+ struct dprc_obj_desc *__obj_desc = _obj_desc; \
+ (strcmp(__mc_dev->obj_desc.type, __obj_desc->type) == 0 && \
+ __mc_dev->obj_desc.id == __obj_desc->id); \
+})

struct dprc_child_objs {
int child_count;
diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c b/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c
index ce07096..d3def40 100644
--- a/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c
+++ b/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c
@@ -17,10 +17,13 @@
#include "dpcon-cmd.h"
#include "fsl-mc-private.h"

-#define FSL_MC_IS_ALLOCATABLE(_obj_type) \
- (strcmp(_obj_type, "dpbp") == 0 || \
- strcmp(_obj_type, "dpmcp") == 0 || \
- strcmp(_obj_type, "dpcon") == 0)
+#define FSL_MC_IS_ALLOCATABLE(_obj_type) \
+({ \
+ const char *__obj_type = _obj_type; \
+ (strcmp(__obj_type, "dpbp") == 0 || \
+ strcmp(__obj_type, "dpmcp") == 0 || \
+ strcmp(__obj_type, "dpcon") == 0); \
+})

/**
* fsl_mc_resource_pool_add_device - add allocatable object to a resource
--
2.9.4

2017-06-08 14:29:23

by Laurentiu Tudor

[permalink] [raw]
Subject: [PATCH v7 03/10] staging: fsl-mc: simplify couple of deallocations

From: Laurentiu Tudor <[email protected]>

Simplify a couple of deallocations code paths. This also fixes these
checkpatch.pl false positives:
"WARNING: kfree(NULL) is safe and this check is probably not required"

Signed-off-by: Laurentiu Tudor <[email protected]>
---

Notes:
-v7
-rewrapped commit message

drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c
index 50eb415..7b48ade 100644
--- a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c
+++ b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c
@@ -420,15 +420,11 @@ bool fsl_mc_is_root_dprc(struct device *dev)
static void fsl_mc_device_release(struct device *dev)
{
struct fsl_mc_device *mc_dev = to_fsl_mc_device(dev);
- struct fsl_mc_bus *mc_bus = NULL;

kfree(mc_dev->regions);

if (strcmp(mc_dev->obj_desc.type, "dprc") == 0)
- mc_bus = to_fsl_mc_bus(mc_dev);
-
- if (mc_bus)
- kfree(mc_bus);
+ kfree(to_fsl_mc_bus(mc_dev));
else
kfree(mc_dev);
}
@@ -559,10 +555,8 @@ int fsl_mc_device_add(struct dprc_obj_desc *obj_desc,

error_cleanup_dev:
kfree(mc_dev->regions);
- if (mc_bus)
- kfree(mc_bus);
- else
- kfree(mc_dev);
+ kfree(mc_bus);
+ kfree(mc_dev);

return error;
}
--
2.9.4

2017-06-13 10:12:39

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v7 02/10] staging: fsl-mc: fix macros with possible side effects

On Thu, Jun 08, 2017 at 05:28:47PM +0300, [email protected] wrote:
> From: Laurentiu Tudor <[email protected]>
>
> Several macros were triggering this checkpatch.pl warning:
> "Macro argument reuse '$arg' - possible side-effects?"
> Fix the warning by avoiding multiple macro argument use.
>
> Signed-off-by: Laurentiu Tudor <[email protected]>
> ---
>
> Notes:
> -v7
> -no changes
>
> drivers/staging/fsl-mc/bus/dprc-driver.c | 10 +++++++---
> drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 11 +++++++----
> 2 files changed, 14 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/fsl-mc/bus/dprc-driver.c b/drivers/staging/fsl-mc/bus/dprc-driver.c
> index d723c69..39c9a3b 100644
> --- a/drivers/staging/fsl-mc/bus/dprc-driver.c
> +++ b/drivers/staging/fsl-mc/bus/dprc-driver.c
> @@ -21,9 +21,13 @@
>
> #define FSL_MC_DPRC_DRIVER_NAME "fsl_mc_dprc"
>
> -#define FSL_MC_DEVICE_MATCH(_mc_dev, _obj_desc) \
> - (strcmp((_mc_dev)->obj_desc.type, (_obj_desc)->type) == 0 && \
> - (_mc_dev)->obj_desc.id == (_obj_desc)->id)
> +#define FSL_MC_DEVICE_MATCH(_mc_dev, _obj_desc) \
> +({ \
> + struct fsl_mc_device *__mc_dev = _mc_dev; \
> + struct dprc_obj_desc *__obj_desc = _obj_desc; \
> + (strcmp(__mc_dev->obj_desc.type, __obj_desc->type) == 0 && \
> + __mc_dev->obj_desc.id == __obj_desc->id); \
> +})

Ick, no. Just make this a real function please.

>
> struct dprc_child_objs {
> int child_count;
> diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c b/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c
> index ce07096..d3def40 100644
> --- a/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c
> +++ b/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c
> @@ -17,10 +17,13 @@
> #include "dpcon-cmd.h"
> #include "fsl-mc-private.h"
>
> -#define FSL_MC_IS_ALLOCATABLE(_obj_type) \
> - (strcmp(_obj_type, "dpbp") == 0 || \
> - strcmp(_obj_type, "dpmcp") == 0 || \
> - strcmp(_obj_type, "dpcon") == 0)
> +#define FSL_MC_IS_ALLOCATABLE(_obj_type) \
> +({ \
> + const char *__obj_type = _obj_type; \
> + (strcmp(__obj_type, "dpbp") == 0 || \
> + strcmp(__obj_type, "dpmcp") == 0 || \
> + strcmp(__obj_type, "dpcon") == 0); \
> +})

Same here. Don't put real logic in a #define, it never makes sense to
do it and only makes things much harder to debug.

thanks,

greg k-h

2017-06-13 10:22:26

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v7 10/10] staging: fsl-mc: move bus driver out of staging

On Thu, Jun 08, 2017 at 05:28:55PM +0300, [email protected] wrote:
> From: Stuart Yoder <[email protected]>
>
> Move the source files out of staging into their final locations:
> -include files in drivers/staging/fsl-mc/include go to include/linux/fsl
> -irq-gic-v3-its-fsl-mc-msi.c goes to drivers/irqchip

Why do you have so many different .h files? You should only need 1
"external" one, and one "internal" one, right? Can you please work on
cleaning that up first?

thanks,

greg k-h

2017-06-14 12:27:26

by Laurentiu Tudor

[permalink] [raw]
Subject: Re: [PATCH v7 02/10] staging: fsl-mc: fix macros with possible side effects



On 06/13/2017 01:12 PM, Greg KH wrote:
> On Thu, Jun 08, 2017 at 05:28:47PM +0300, [email protected] wrote:
>> From: Laurentiu Tudor <[email protected]>
>>
>> Several macros were triggering this checkpatch.pl warning:
>> "Macro argument reuse '$arg' - possible side-effects?"
>> Fix the warning by avoiding multiple macro argument use.
>>
>> Signed-off-by: Laurentiu Tudor <[email protected]>
>> ---
>>
>> Notes:
>> -v7
>> -no changes
>>
>> drivers/staging/fsl-mc/bus/dprc-driver.c | 10 +++++++---
>> drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 11 +++++++----
>> 2 files changed, 14 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/staging/fsl-mc/bus/dprc-driver.c b/drivers/staging/fsl-mc/bus/dprc-driver.c
>> index d723c69..39c9a3b 100644
>> --- a/drivers/staging/fsl-mc/bus/dprc-driver.c
>> +++ b/drivers/staging/fsl-mc/bus/dprc-driver.c
>> @@ -21,9 +21,13 @@
>>
>> #define FSL_MC_DPRC_DRIVER_NAME "fsl_mc_dprc"
>>
>> -#define FSL_MC_DEVICE_MATCH(_mc_dev, _obj_desc) \
>> - (strcmp((_mc_dev)->obj_desc.type, (_obj_desc)->type) == 0 && \
>> - (_mc_dev)->obj_desc.id == (_obj_desc)->id)
>> +#define FSL_MC_DEVICE_MATCH(_mc_dev, _obj_desc) \
>> +({ \
>> + struct fsl_mc_device *__mc_dev = _mc_dev; \
>> + struct dprc_obj_desc *__obj_desc = _obj_desc; \
>> + (strcmp(__mc_dev->obj_desc.type, __obj_desc->type) == 0 && \
>> + __mc_dev->obj_desc.id == __obj_desc->id); \
>> +})
>
> Ick, no. Just make this a real function please.
>
>>
>> struct dprc_child_objs {
>> int child_count;
>> diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c b/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c
>> index ce07096..d3def40 100644
>> --- a/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c
>> +++ b/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c
>> @@ -17,10 +17,13 @@
>> #include "dpcon-cmd.h"
>> #include "fsl-mc-private.h"
>>
>> -#define FSL_MC_IS_ALLOCATABLE(_obj_type) \
>> - (strcmp(_obj_type, "dpbp") == 0 || \
>> - strcmp(_obj_type, "dpmcp") == 0 || \
>> - strcmp(_obj_type, "dpcon") == 0)
>> +#define FSL_MC_IS_ALLOCATABLE(_obj_type) \
>> +({ \
>> + const char *__obj_type = _obj_type; \
>> + (strcmp(__obj_type, "dpbp") == 0 || \
>> + strcmp(__obj_type, "dpmcp") == 0 || \
>> + strcmp(__obj_type, "dpcon") == 0); \
>> +})
>
> Same here. Don't put real logic in a #define, it never makes sense to
> do it and only makes things much harder to debug.
>

Ok, will do. Lets drop this patch and i'll send another one changing all
these to functions.

---
Thanks & Best Regards, Laurentiu

2017-06-14 13:38:11

by Laurentiu Tudor

[permalink] [raw]
Subject: Re: [PATCH v7 10/10] staging: fsl-mc: move bus driver out of staging

Hi Greg,

On 06/13/2017 01:22 PM, Greg KH wrote:
> On Thu, Jun 08, 2017 at 05:28:55PM +0300, [email protected] wrote:
>> From: Stuart Yoder <[email protected]>
>>
>> Move the source files out of staging into their final locations:
>> -include files in drivers/staging/fsl-mc/include go to include/linux/fsl
>> -irq-gic-v3-its-fsl-mc-msi.c goes to drivers/irqchip
>
> Why do you have so many different .h files? You should only need 1
> "external" one, and one "internal" one, right? Can you please work on
> cleaning that up first?
>

So here's the list of headers, for quick reference.

dpbp.h
dpcon-cmd.h
dpmng.h
dprc.h
mc-bus.h
mc-cmd.h
mc-sys.h
mc.h

And here's a proposal on how to reorganize them:

- dpbp.h (together with dbbp.c) be left behind in staging as they are
not used by the bus itself but by the drivers probing on this bus.
They will be moved out of staging at a later time.
- same for dpcon-cmd.h. Will handle it when we'll start work on
getting dpcon.c & dpcon.h out of staging.
- dprc.h contains APIs for handling mc-bus "device containers" that are
managed by the mc-bus driver itself. I'd leave this as is, but i
think i can make it private.
- regarding the multiple mc*.h files, i'll see what it takes to
refactor them in a mc-bus.h + mc-bus-private.h
- dpmng.h merged in the public header

Regarding the future plans for dpbp.h and dpcon.h, these expose common
APIs used throughout all the drivers, so i think it makes sense to leave
them as they are and, when their time comes, move them in the public
include/linux/fsl.

---
Thanks & Best Regards, Laurentiu

2017-06-14 13:48:36

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v7 10/10] staging: fsl-mc: move bus driver out of staging

On Wed, Jun 14, 2017 at 01:38:04PM +0000, Laurentiu Tudor wrote:
> Hi Greg,
>
> On 06/13/2017 01:22 PM, Greg KH wrote:
> > On Thu, Jun 08, 2017 at 05:28:55PM +0300, [email protected] wrote:
> >> From: Stuart Yoder <[email protected]>
> >>
> >> Move the source files out of staging into their final locations:
> >> -include files in drivers/staging/fsl-mc/include go to include/linux/fsl
> >> -irq-gic-v3-its-fsl-mc-msi.c goes to drivers/irqchip
> >
> > Why do you have so many different .h files? You should only need 1
> > "external" one, and one "internal" one, right? Can you please work on
> > cleaning that up first?
> >
>
> So here's the list of headers, for quick reference.
>
> dpbp.h
> dpcon-cmd.h
> dpmng.h
> dprc.h
> mc-bus.h
> mc-cmd.h
> mc-sys.h
> mc.h
>
> And here's a proposal on how to reorganize them:
>
> - dpbp.h (together with dbbp.c) be left behind in staging as they are
> not used by the bus itself but by the drivers probing on this bus.
> They will be moved out of staging at a later time.
> - same for dpcon-cmd.h. Will handle it when we'll start work on
> getting dpcon.c & dpcon.h out of staging.
> - dprc.h contains APIs for handling mc-bus "device containers" that are
> managed by the mc-bus driver itself. I'd leave this as is, but i
> think i can make it private.
> - regarding the multiple mc*.h files, i'll see what it takes to
> refactor them in a mc-bus.h + mc-bus-private.h
> - dpmng.h merged in the public header
>
> Regarding the future plans for dpbp.h and dpcon.h, these expose common
> APIs used throughout all the drivers, so i think it makes sense to leave
> them as they are and, when their time comes, move them in the public
> include/linux/fsl.

Ok, that sounds like a good start, let's see how that goes...