linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3][v4] staging: fsl-mc: move bus driver out of staging
@ 2017-05-19 13:13 laurentiu.tudor at nxp.com
  2017-05-19 13:13 ` [PATCH 1/3] staging: fsl-mc: fix several checkpath.pl warnings laurentiu.tudor at nxp.com
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: laurentiu.tudor at nxp.com @ 2017-05-19 13:13 UTC (permalink / raw)
  To: linux-arm-kernel

From: Laurentiu Tudor <laurentiu.tudor@nxp.com>

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 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:
https://lkml.org/lkml/2016/12/1/758

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

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 (2):
  staging: fsl-mc: fix several checkpath.pl warnings
  staging: fsl-mc: add binding path to MAINTAINERS

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

 .../README.txt => Documentation/dpaa2/overview.txt    |  0
 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  |  6 +++---
 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        |  5 +++--
 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, 108 insertions(+), 111 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 (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 (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 (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%)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/3] staging: fsl-mc: fix several checkpath.pl warnings
  2017-05-19 13:13 [PATCH 0/3][v4] staging: fsl-mc: move bus driver out of staging laurentiu.tudor at nxp.com
@ 2017-05-19 13:13 ` laurentiu.tudor at nxp.com
  2017-05-19 13:13 ` [PATCH 2/3] staging: fsl-mc: add binding path to MAINTAINERS laurentiu.tudor at nxp.com
  2017-05-19 13:13 ` [PATCH 3/3][v4] staging: fsl-mc: move bus driver out of staging laurentiu.tudor at nxp.com
  2 siblings, 0 replies; 12+ messages in thread
From: laurentiu.tudor at nxp.com @ 2017-05-19 13:13 UTC (permalink / raw)
  To: linux-arm-kernel

From: Laurentiu Tudor <laurentiu.tudor@nxp.com>

Remove several unneeded #includes, forward
declarations and fix several issues reported
by checkpatch.pl --strict, such as:
 - kfree(NULL) is safe and check is not required
 - macro argument reuse may cause possible side effects
 - enclose macro params in parens to avoid precedence issues
 - coding style

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
---
 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 +-
 drivers/staging/fsl-mc/bus/dprc-driver.c      | 10 +++++++---
 drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 11 +++++++----
 drivers/staging/fsl-mc/bus/fsl-mc-bus.c       | 12 +++---------
 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         |  3 ---
 drivers/staging/fsl-mc/include/mc-sys.h       |  1 -
 11 files changed, 22 insertions(+), 25 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)
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
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;
 }
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..2f4a7a7 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
@@ -51,7 +49,6 @@ int dprc_close(struct fsl_mc_io *mc_io,
 	       u32 cmd_flags,
 	       u16 token);
 
-
 /* IRQ */
 
 /* IRQ index */
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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/3] staging: fsl-mc: add binding path to MAINTAINERS
  2017-05-19 13:13 [PATCH 0/3][v4] staging: fsl-mc: move bus driver out of staging laurentiu.tudor at nxp.com
  2017-05-19 13:13 ` [PATCH 1/3] staging: fsl-mc: fix several checkpath.pl warnings laurentiu.tudor at nxp.com
@ 2017-05-19 13:13 ` laurentiu.tudor at nxp.com
  2017-05-19 13:13 ` [PATCH 3/3][v4] staging: fsl-mc: move bus driver out of staging laurentiu.tudor at nxp.com
  2 siblings, 0 replies; 12+ messages in thread
From: laurentiu.tudor at nxp.com @ 2017-05-19 13:13 UTC (permalink / raw)
  To: linux-arm-kernel

From: Laurentiu Tudor <laurentiu.tudor@nxp.com>

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index f7d568b..50b3c36 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -10542,6 +10542,7 @@ M:	Laurentiu Tudor <laurentiu.tudor@nxp.com>
 L:	linux-kernel at vger.kernel.org
 S:	Maintained
 F:	drivers/staging/fsl-mc/
+F:	Documentation/devicetree/bindings/misc/fsl,qoriq-mc.txt
 
 QT1010 MEDIA DRIVER
 M:	Antti Palosaari <crope@iki.fi>
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/3][v4] staging: fsl-mc: move bus driver out of staging
  2017-05-19 13:13 [PATCH 0/3][v4] staging: fsl-mc: move bus driver out of staging laurentiu.tudor at nxp.com
  2017-05-19 13:13 ` [PATCH 1/3] staging: fsl-mc: fix several checkpath.pl warnings laurentiu.tudor at nxp.com
  2017-05-19 13:13 ` [PATCH 2/3] staging: fsl-mc: add binding path to MAINTAINERS laurentiu.tudor at nxp.com
@ 2017-05-19 13:13 ` laurentiu.tudor at nxp.com
  2017-05-19 13:41   ` Matthias Brugger
  2 siblings, 1 reply; 12+ messages in thread
From: laurentiu.tudor at nxp.com @ 2017-05-19 13:13 UTC (permalink / raw)
  To: linux-arm-kernel

From: Stuart Yoder <stuart.yoder@nxp.com>

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 <stuyoder@gmail.com>
Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
[Laurentiu: rebased, add dpaa2_eth and dpio #include updates]
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
---

Notes:
    -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 50b3c36..db38054 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -10541,7 +10541,7 @@ M:	Stuart Yoder <stuyoder@gmail.com>
 M:	Laurentiu Tudor <laurentiu.tudor@nxp.com>
 L:	linux-kernel at vger.kernel.org
 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 6f9eed6..97a64d2 100644
--- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
+++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
@@ -38,8 +38,8 @@
 #include <linux/msi.h>
 #include <linux/kthread.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 c67cced..0a07b41 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 <gregkh@linuxfoundation.org>,
-german.rivera at freescale.com, devel at driverdev.osuosl.org,
-linux-kernel at vger.kernel.org
-
-[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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/3][v4] staging: fsl-mc: move bus driver out of staging
  2017-05-19 13:13 ` [PATCH 3/3][v4] staging: fsl-mc: move bus driver out of staging laurentiu.tudor at nxp.com
@ 2017-05-19 13:41   ` Matthias Brugger
  2017-05-19 22:57     ` Stuart Yoder
  2017-05-20  6:43     ` Marc Zyngier
  0 siblings, 2 replies; 12+ messages in thread
From: Matthias Brugger @ 2017-05-19 13:41 UTC (permalink / raw)
  To: linux-arm-kernel



On 19/05/17 15:13, laurentiu.tudor at nxp.com wrote:
> From: Stuart Yoder <stuart.yoder@nxp.com>
> 
> 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

This driver has as compatible "arm,gic-v3-its". I wonder if this is 
correct and if it should be moved like this out of staging.

Regards,
Matthias

>    -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 <stuyoder@gmail.com>
> Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
> [Laurentiu: rebased, add dpaa2_eth and dpio #include updates]
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Jason Cooper <jason@lakedaemon.net>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> ---
> 
> Notes:
>      -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 50b3c36..db38054 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -10541,7 +10541,7 @@ M:	Stuart Yoder <stuyoder@gmail.com>
>   M:	Laurentiu Tudor <laurentiu.tudor@nxp.com>
>   L:	linux-kernel at vger.kernel.org
>   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 6f9eed6..97a64d2 100644
> --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
> +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
> @@ -38,8 +38,8 @@
>   #include <linux/msi.h>
>   #include <linux/kthread.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 c67cced..0a07b41 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 <gregkh@linuxfoundation.org>,
> -german.rivera at freescale.com, devel at driverdev.osuosl.org,
> -linux-kernel at vger.kernel.org
> -
> -[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
>   
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 3/3][v4] staging: fsl-mc: move bus driver out of staging
  2017-05-19 13:41   ` Matthias Brugger
@ 2017-05-19 22:57     ` Stuart Yoder
  2017-05-20  6:43     ` Marc Zyngier
  1 sibling, 0 replies; 12+ messages in thread
From: Stuart Yoder @ 2017-05-19 22:57 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, May 19, 2017 at 8:41 AM, Matthias Brugger
<matthias.bgg@gmail.com> wrote:
>
>
> On 19/05/17 15:13, laurentiu.tudor at nxp.com wrote:
>>
>> From: Stuart Yoder <stuart.yoder@nxp.com>
>>
>> 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
>
>
> This driver has as compatible "arm,gic-v3-its". I wonder if this is correct
> and if it should be moved like this out of staging.

Matthias, can you be more specific as to what your concern is?

The fsl-mc bus needs to implement bus specific gic-v3 MSI support just
like the other
bus types.  See:
   drivers/irqchip/irq-gic-v3-its-pci-msi.c
   drivers/irqchip/irq-gic-v3-its-platform-msi.c

You will see that the PCI and platform bus types also find the gic-v3 node by
compatible string.

The bus specific gic-v3 support for fsl-mc is implemented in a
completely standard way.

Thanks,
Stuart

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 3/3][v4] staging: fsl-mc: move bus driver out of staging
  2017-05-19 13:41   ` Matthias Brugger
  2017-05-19 22:57     ` Stuart Yoder
@ 2017-05-20  6:43     ` Marc Zyngier
  2017-05-22  7:12       ` Laurentiu Tudor
  1 sibling, 1 reply; 12+ messages in thread
From: Marc Zyngier @ 2017-05-20  6:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, May 19 2017 at 02:41:43 PM, Matthias Brugger <matthias.bgg@gmail.com> wrote:
> On 19/05/17 15:13, laurentiu.tudor at nxp.com wrote:
>> From: Stuart Yoder <stuart.yoder@nxp.com>
>>
>> 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
>
> This driver has as compatible "arm,gic-v3-its". I wonder if this is
> correct and if it should be moved like this out of staging.

This is no different from the way we handle *any* bus that uses the
GICv3 ITS as an MSI controller. Each bus provides its glue code that
latches onto the ITS node, and calls into the generic code.

Now, when it comes to moving this out of staging, here is my concern:
There is mention of a userspace tool (restool) used to control the
HW. Where is this tool? Where is the user ABI documented?

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 3/3][v4] staging: fsl-mc: move bus driver out of staging
  2017-05-20  6:43     ` Marc Zyngier
@ 2017-05-22  7:12       ` Laurentiu Tudor
  2017-05-22  7:40         ` Marc Zyngier
  0 siblings, 1 reply; 12+ messages in thread
From: Laurentiu Tudor @ 2017-05-22  7:12 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Marc,

> -----Original Message-----
> From: Marc Zyngier [mailto:marc.zyngier at arm.com]
> Sent: Saturday, May 20, 2017 9:43 AM
> To: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>; gregkh at linuxfoundation.org;
> stuyoder at gmail.com; devel at driverdev.osuosl.org; arnd at arndb.de; Ruxandra
> Ioana Radulescu <ruxandra.radulescu@nxp.com>; Stuart Yoder
> <stuart.yoder@nxp.com>; Roy Pledge <roy.pledge@nxp.com>; linux-
> kernel at vger.kernel.org; agraf at suse.de; Catalin Horghidan
> <catalin.horghidan@nxp.com>; Ioana Ciornei <ioana.ciornei@nxp.com>;
> Thomas Gleixner <tglx@linutronix.de>; Leo Li <leoyang.li@nxp.com>; Bharat
> Bhushan <bharat.bhushan@nxp.com>; Jason Cooper <jason@lakedaemon.net>;
> linux-arm-kernel at lists.infradead.org; Rob Herring <robh+dt@kernel.org>
> Subject: Re: [PATCH 3/3][v4] staging: fsl-mc: move bus driver out of staging
> Importance: High
> 
> On Fri, May 19 2017 at 02:41:43 PM, Matthias Brugger
> <matthias.bgg@gmail.com> wrote:
> > On 19/05/17 15:13, laurentiu.tudor at nxp.com wrote:
> >> From: Stuart Yoder <stuart.yoder@nxp.com>
> >>
> >> 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
> >
> > This driver has as compatible "arm,gic-v3-its". I wonder if this is
> > correct and if it should be moved like this out of staging.
> 
> This is no different from the way we handle *any* bus that uses the
> GICv3 ITS as an MSI controller. Each bus provides its glue code that latches onto
> the ITS node, and calls into the generic code.
> 
> Now, when it comes to moving this out of staging, here is my concern:
> There is mention of a userspace tool (restool) used to control the HW. Where is
> this tool? Where is the user ABI documented?

The tool is published here:

https://github.com/qoriq-open-source/restool

There are two ways of configuring the mc-bus:
 - a static one, through a FDT based configuration file (we call it DPL), documented in the refman linked below, chapter 22.
 - a dynamic one, using this restool utility.
Please note the usage of restool is optional.

The reference manual documenting the ABI can be found here (registration required):

https://freescale.sdlproducts.com/LiveContent/content/en-US/QorIQ_SDK/GUID-53BEBDD8-1A5E-4DD0-8354-A9647AD35755

Click on the DPAA2 user manual link.

We're also working on publishing the docs on github so that they're more accessible.

---
Thanks & Best Regards, Laurentiu

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 3/3][v4] staging: fsl-mc: move bus driver out of staging
  2017-05-22  7:12       ` Laurentiu Tudor
@ 2017-05-22  7:40         ` Marc Zyngier
  2017-05-22  8:42           ` Laurentiu Tudor
  0 siblings, 1 reply; 12+ messages in thread
From: Marc Zyngier @ 2017-05-22  7:40 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, May 22 2017 at  7:12:39 am GMT, Laurentiu Tudor <laurentiu.tudor@nxp.com> wrote:

Hi Laurentiu,

> Hi Marc,
>
>> -----Original Message-----
>> From: Marc Zyngier [mailto:marc.zyngier at arm.com]
>> Sent: Saturday, May 20, 2017 9:43 AM
>> To: Matthias Brugger <matthias.bgg@gmail.com>
>> Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>; gregkh at linuxfoundation.org;
>> stuyoder at gmail.com; devel at driverdev.osuosl.org; arnd at arndb.de; Ruxandra
>> Ioana Radulescu <ruxandra.radulescu@nxp.com>; Stuart Yoder
>> <stuart.yoder@nxp.com>; Roy Pledge <roy.pledge@nxp.com>; linux-
>> kernel at vger.kernel.org; agraf at suse.de; Catalin Horghidan
>> <catalin.horghidan@nxp.com>; Ioana Ciornei <ioana.ciornei@nxp.com>;
>> Thomas Gleixner <tglx@linutronix.de>; Leo Li <leoyang.li@nxp.com>; Bharat
>> Bhushan <bharat.bhushan@nxp.com>; Jason Cooper <jason@lakedaemon.net>;
>> linux-arm-kernel at lists.infradead.org; Rob Herring <robh+dt@kernel.org>
>> Subject: Re: [PATCH 3/3][v4] staging: fsl-mc: move bus driver out of staging
>> Importance: High
>> 
>> On Fri, May 19 2017 at 02:41:43 PM, Matthias Brugger
>> <matthias.bgg@gmail.com> wrote:
>> > On 19/05/17 15:13, laurentiu.tudor at nxp.com wrote:
>> >> From: Stuart Yoder <stuart.yoder@nxp.com>
>> >>
>> >> 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
>> >
>> > This driver has as compatible "arm,gic-v3-its". I wonder if this is
>> > correct and if it should be moved like this out of staging.
>> 
>> This is no different from the way we handle *any* bus that uses the
>> GICv3 ITS as an MSI controller. Each bus provides its glue code that
>> latches onto
>> the ITS node, and calls into the generic code.
>> 
>> Now, when it comes to moving this out of staging, here is my concern:
>> There is mention of a userspace tool (restool) used to control the
>> HW. Where is
>> this tool? Where is the user ABI documented?
>
> The tool is published here:
>
> https://github.com/qoriq-open-source/restool
>
> There are two ways of configuring the mc-bus:
>  - a static one, through a FDT based configuration file (we call it
> DPL), documented in the refman linked below, chapter 22.
>  - a dynamic one, using this restool utility.
> Please note the usage of restool is optional.

Optional or not, it still is a userspace ABI, and while I can see
restool issuing ioctl system calls to configure the HW, I cannot see the
corresponding code in the kernel tree. So how does it work?

If the syscall interface is not present in the mainline kernel, drop the
reference to it in the documentation. If it is there (and I obviously
missed it), document it, and get it reviewed. If there are associated DT
bindings to the kernel code, they must be documented (and reviewed) as
part of the device-tree documentation, and not in some obscure, hard to
access document.

>
> The reference manual documenting the ABI can be found here
> (registration required):
>
> https://freescale.sdlproducts.com/LiveContent/content/en-US/QorIQ_SDK/GUID-53BEBDD8-1A5E-4DD0-8354-A9647AD35755
>
> Click on the DPAA2 user manual link.
>
> We're also working on publishing the docs on github so that they're
> more accessible.

That'd be great, because the way the registration process is presented,
I'd have to agree to the Access Agreement *before* having a chance to
read it. Not going to happen...

Thanks,

	M.
-- 
Jazz is not dead, it just smell funny.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 3/3][v4] staging: fsl-mc: move bus driver out of staging
  2017-05-22  7:40         ` Marc Zyngier
@ 2017-05-22  8:42           ` Laurentiu Tudor
  2017-05-22  9:06             ` Marc Zyngier
  0 siblings, 1 reply; 12+ messages in thread
From: Laurentiu Tudor @ 2017-05-22  8:42 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Marc,

> -----Original Message-----
> From: Marc Zyngier [mailto:marc.zyngier at arm.com]
> Sent: Monday, May 22, 2017 10:41 AM
> 
> On Mon, May 22 2017 at  7:12:39 am GMT, Laurentiu Tudor
> <laurentiu.tudor@nxp.com> wrote:
> 
> Hi Laurentiu,
> 
> > Hi Marc,
> >
> >> -----Original Message-----
> >> From: Marc Zyngier [mailto:marc.zyngier at arm.com]
> >> Sent: Saturday, May 20, 2017 9:43 AM
> >> To: Matthias Brugger <matthias.bgg@gmail.com>
> >>
> >> On Fri, May 19 2017 at 02:41:43 PM, Matthias Brugger
> >> <matthias.bgg@gmail.com> wrote:
> >> > On 19/05/17 15:13, laurentiu.tudor at nxp.com wrote:
> >> >> From: Stuart Yoder <stuart.yoder@nxp.com>
> >> >>
> >> >> 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
> >> >
> >> > This driver has as compatible "arm,gic-v3-its". I wonder if this is
> >> > correct and if it should be moved like this out of staging.
> >>
> >> This is no different from the way we handle *any* bus that uses the
> >> GICv3 ITS as an MSI controller. Each bus provides its glue code that
> >> latches onto the ITS node, and calls into the generic code.
> >>
> >> Now, when it comes to moving this out of staging, here is my concern:
> >> There is mention of a userspace tool (restool) used to control the
> >> HW. Where is this tool? Where is the user ABI documented?
> >
> > The tool is published here:
> >
> > https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit
> > hub.com%2Fqoriq-open-
> source%2Frestool&data=01%7C01%7Claurentiu.tudor%4
> >
> 0nxp.com%7Cd3c05908969d499cd4a008d4a0e5eaae%7C686ea1d3bc2b4c6fa92
> cd99c
> >
> 5c301635%7C0&sdata=2sEXCZ%2BAFlTtle8N3yWJPsGRve8cXMRPzyumlwqOhbg
> %3D&re
> > served=0
> >
> > There are two ways of configuring the mc-bus:
> >  - a static one, through a FDT based configuration file (we call it
> > DPL), documented in the refman linked below, chapter 22.
> >  - a dynamic one, using this restool utility.
> > Please note the usage of restool is optional.
> 
> Optional or not, it still is a userspace ABI, and while I can see restool issuing ioctl
> system calls to configure the HW, I cannot see the corresponding code in the
> kernel tree. So how does it work?
> If the syscall interface is not present in the mainline kernel, drop the reference
> to it in the documentation. If it is there (and I obviously missed it), document it,
> and get it reviewed. 

Our original plan was to first get the bus out of staging and after that submit the restool support ASAP (patches are done - so I'm thinking at few days timeframe).
if this is not acceptable, I can drop the restool reference from the README and resubmit the patch series. We'll re-add the reference together with the restool support patches.

> If there are associated DT bindings to the kernel code, they
> must be documented (and reviewed) as part of the device-tree documentation,
> and not in some obscure, hard to access document.

There's only one binding involved and it's already accepted [1].

[snip]

> >
> > We're also working on publishing the docs on github so that they're
> > more accessible.
> 
> That'd be great, because the way the registration process is presented, I'd have
> to agree to the Access Agreement *before* having a chance to read it. Not
> going to happen...

Sorry about that. Not much I can do. :-( 

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/misc/fsl,qoriq-mc.txt

---
Best Regards, Laurentiu

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 3/3][v4] staging: fsl-mc: move bus driver out of staging
  2017-05-22  8:42           ` Laurentiu Tudor
@ 2017-05-22  9:06             ` Marc Zyngier
  2017-05-22  9:15               ` Laurentiu Tudor
  0 siblings, 1 reply; 12+ messages in thread
From: Marc Zyngier @ 2017-05-22  9:06 UTC (permalink / raw)
  To: linux-arm-kernel

On 22/05/17 09:42, Laurentiu Tudor wrote:
> Hi Marc,
> 
>> -----Original Message-----
>> From: Marc Zyngier [mailto:marc.zyngier at arm.com]
>> Sent: Monday, May 22, 2017 10:41 AM
>>
>> On Mon, May 22 2017 at  7:12:39 am GMT, Laurentiu Tudor
>> <laurentiu.tudor@nxp.com> wrote:
>>
>> Hi Laurentiu,
>>
>>> Hi Marc,
>>>
>>>> -----Original Message-----
>>>> From: Marc Zyngier [mailto:marc.zyngier at arm.com]
>>>> Sent: Saturday, May 20, 2017 9:43 AM
>>>> To: Matthias Brugger <matthias.bgg@gmail.com>
>>>>
>>>> On Fri, May 19 2017 at 02:41:43 PM, Matthias Brugger
>>>> <matthias.bgg@gmail.com> wrote:
>>>>> On 19/05/17 15:13, laurentiu.tudor at nxp.com wrote:
>>>>>> From: Stuart Yoder <stuart.yoder@nxp.com>
>>>>>>
>>>>>> 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
>>>>>
>>>>> This driver has as compatible "arm,gic-v3-its". I wonder if this is
>>>>> correct and if it should be moved like this out of staging.
>>>>
>>>> This is no different from the way we handle *any* bus that uses the
>>>> GICv3 ITS as an MSI controller. Each bus provides its glue code that
>>>> latches onto the ITS node, and calls into the generic code.
>>>>
>>>> Now, when it comes to moving this out of staging, here is my concern:
>>>> There is mention of a userspace tool (restool) used to control the
>>>> HW. Where is this tool? Where is the user ABI documented?
>>>
>>> The tool is published here:
>>>
>>> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit
>>> hub.com%2Fqoriq-open-
>> source%2Frestool&data=01%7C01%7Claurentiu.tudor%4
>>>
>> 0nxp.com%7Cd3c05908969d499cd4a008d4a0e5eaae%7C686ea1d3bc2b4c6fa92
>> cd99c
>>>
>> 5c301635%7C0&sdata=2sEXCZ%2BAFlTtle8N3yWJPsGRve8cXMRPzyumlwqOhbg
>> %3D&re
>>> served=0
>>>
>>> There are two ways of configuring the mc-bus:
>>>  - a static one, through a FDT based configuration file (we call it
>>> DPL), documented in the refman linked below, chapter 22.
>>>  - a dynamic one, using this restool utility.
>>> Please note the usage of restool is optional.
>>
>> Optional or not, it still is a userspace ABI, and while I can see restool issuing ioctl
>> system calls to configure the HW, I cannot see the corresponding code in the
>> kernel tree. So how does it work?
>> If the syscall interface is not present in the mainline kernel, drop the reference
>> to it in the documentation. If it is there (and I obviously missed it), document it,
>> and get it reviewed. 
> 
> Our original plan was to first get the bus out of staging and after that submit the restool support ASAP (patches are done - so I'm thinking at few days timeframe).
> if this is not acceptable, I can drop the restool reference from the README and resubmit the patch series. We'll re-add the reference together with the restool support patches.

I think it would make a lot more sense to drop anything that is not
implemented by the current code. Once you have patches that implement
this userspace interface, they can be reviewed together with the
corresponding documentation.

>> If there are associated DT bindings to the kernel code, they
>> must be documented (and reviewed) as part of the device-tree documentation,
>> and not in some obscure, hard to access document.
> 
> There's only one binding involved and it's already accepted [1].

Ah, I missed it. It would be good to mention it in the documentation as
well.

> [snip]
> 
>>>
>>> We're also working on publishing the docs on github so that they're
>>> more accessible.
>>
>> That'd be great, because the way the registration process is presented, I'd have
>> to agree to the Access Agreement *before* having a chance to read it. Not
>> going to happen...
> 
> Sorry about that. Not much I can do. :-( 

I understand this is not your job ;-). But maybe making people inside
NXP aware of the issue would help... Oh well.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 3/3][v4] staging: fsl-mc: move bus driver out of staging
  2017-05-22  9:06             ` Marc Zyngier
@ 2017-05-22  9:15               ` Laurentiu Tudor
  0 siblings, 0 replies; 12+ messages in thread
From: Laurentiu Tudor @ 2017-05-22  9:15 UTC (permalink / raw)
  To: linux-arm-kernel



> -----Original Message-----
> From: Marc Zyngier [mailto:marc.zyngier at arm.com]
> Sent: Monday, May 22, 2017 12:06 PM
> To: Laurentiu Tudor <laurentiu.tudor@nxp.com>
> 
> On 22/05/17 09:42, Laurentiu Tudor wrote:
> > Hi Marc,
> >
> >> -----Original Message-----
> >> From: Marc Zyngier [mailto:marc.zyngier at arm.com]
> >> Sent: Monday, May 22, 2017 10:41 AM
> >>
> >> On Mon, May 22 2017 at  7:12:39 am GMT, Laurentiu Tudor
> >> <laurentiu.tudor@nxp.com> wrote:
> >>
> >> Hi Laurentiu,
> >>
> >>> Hi Marc,
> >>>
> >>>> -----Original Message-----
> >>>> From: Marc Zyngier [mailto:marc.zyngier at arm.com]
> >>>> Sent: Saturday, May 20, 2017 9:43 AM
> >>>> To: Matthias Brugger <matthias.bgg@gmail.com>
> >>>>
> >>>> On Fri, May 19 2017 at 02:41:43 PM, Matthias Brugger
> >>>> <matthias.bgg@gmail.com> wrote:
> >>>>> On 19/05/17 15:13, laurentiu.tudor at nxp.com wrote:
> >>>>>> From: Stuart Yoder <stuart.yoder@nxp.com>
> >>>>>>
> >>>>>> 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
> >>>>>
> >>>>> This driver has as compatible "arm,gic-v3-its". I wonder if this
> >>>>> is correct and if it should be moved like this out of staging.
> >>>>
> >>>> This is no different from the way we handle *any* bus that uses the
> >>>> GICv3 ITS as an MSI controller. Each bus provides its glue code
> >>>> that latches onto the ITS node, and calls into the generic code.
> >>>>
> >>>> Now, when it comes to moving this out of staging, here is my concern:
> >>>> There is mention of a userspace tool (restool) used to control the
> >>>> HW. Where is this tool? Where is the user ABI documented?
> >>>
> >>> The tool is published here:

[snip]

> >>> There are two ways of configuring the mc-bus:
> >>>  - a static one, through a FDT based configuration file (we call it
> >>> DPL), documented in the refman linked below, chapter 22.
> >>>  - a dynamic one, using this restool utility.
> >>> Please note the usage of restool is optional.
> >>
> >> Optional or not, it still is a userspace ABI, and while I can see
> >> restool issuing ioctl system calls to configure the HW, I cannot see
> >> the corresponding code in the kernel tree. So how does it work?
> >> If the syscall interface is not present in the mainline kernel, drop
> >> the reference to it in the documentation. If it is there (and I
> >> obviously missed it), document it, and get it reviewed.
> >
> > Our original plan was to first get the bus out of staging and after that submit
> the restool support ASAP (patches are done - so I'm thinking at few days
> timeframe).
> > if this is not acceptable, I can drop the restool reference from the README
> and resubmit the patch series. We'll re-add the reference together with the
> restool support patches.
> 
> I think it would make a lot more sense to drop anything that is not implemented
> by the current code. Once you have patches that implement this userspace
> interface, they can be reviewed together with the corresponding
> documentation.

Ok, sounds good. I'll respin the patch series. 

> >> If there are associated DT bindings to the kernel code, they must be
> >> documented (and reviewed) as part of the device-tree documentation,
> >> and not in some obscure, hard to access document.
> >
> > There's only one binding involved and it's already accepted [1].
> 
> Ah, I missed it. It would be good to mention it in the documentation as well.

Good point. I'll add a reference in the next respin.

> > [snip]
> >
> >>>
> >>> We're also working on publishing the docs on github so that they're
> >>> more accessible.
> >>
> >> That'd be great, because the way the registration process is
> >> presented, I'd have to agree to the Access Agreement *before* having
> >> a chance to read it. Not going to happen...
> >
> > Sorry about that. Not much I can do. :-(
> 
> I understand this is not your job ;-). But maybe making people inside NXP aware
> of the issue would help... Oh well.

I'll make sure your comments will reach our guys and in the meantime push to get the docs on github.

---
Thanks & Best Regards, Laurentiu

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-05-22  9:15 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-19 13:13 [PATCH 0/3][v4] staging: fsl-mc: move bus driver out of staging laurentiu.tudor at nxp.com
2017-05-19 13:13 ` [PATCH 1/3] staging: fsl-mc: fix several checkpath.pl warnings laurentiu.tudor at nxp.com
2017-05-19 13:13 ` [PATCH 2/3] staging: fsl-mc: add binding path to MAINTAINERS laurentiu.tudor at nxp.com
2017-05-19 13:13 ` [PATCH 3/3][v4] staging: fsl-mc: move bus driver out of staging laurentiu.tudor at nxp.com
2017-05-19 13:41   ` Matthias Brugger
2017-05-19 22:57     ` Stuart Yoder
2017-05-20  6:43     ` Marc Zyngier
2017-05-22  7:12       ` Laurentiu Tudor
2017-05-22  7:40         ` Marc Zyngier
2017-05-22  8:42           ` Laurentiu Tudor
2017-05-22  9:06             ` Marc Zyngier
2017-05-22  9:15               ` Laurentiu Tudor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).