]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Revert "staging: fsl-mc: move rest of mc-bus.h to private header"
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Jun 2017 11:50:51 +0000 (13:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Jun 2017 11:50:51 +0000 (13:50 +0200)
This reverts commit af4376710cc5188c42eb473676f6c9d2a16692c4.

The whole series is broken, so back it all out.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fsl-mc/bus/dprc-driver.c
drivers/staging/fsl-mc/bus/fsl-mc-allocator.c
drivers/staging/fsl-mc/bus/fsl-mc-bus.c
drivers/staging/fsl-mc/bus/fsl-mc-msi.c
drivers/staging/fsl-mc/bus/fsl-mc-private.h
drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c
drivers/staging/fsl-mc/bus/mc-io.c
drivers/staging/fsl-mc/include/mc-bus.h [new file with mode: 0644]

index 142dfa7b534b741b5cfb93100763bb9eb2718318..844796189586d4a8feea9d2384c5e7dfab8e140d 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/slab.h>
 #include <linux/interrupt.h>
 #include <linux/msi.h>
+#include "../include/mc-bus.h"
 #include "../include/mc-sys.h"
 
 #include "dprc-cmd.h"
index e6a2857a9a989137c88221cb7b64f614306689cc..c2af5b57022254ed15fb510ac31ede833c5eb6c6 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <linux/module.h>
 #include <linux/msi.h>
+#include "../include/mc-bus.h"
 #include "../include/mc-sys.h"
 
 #include "fsl-mc-private.h"
index 3dec3e991d868b7f547556b5857e3a08f3319ac0..60b2a40b4a2f697c5cc0378c805664d12daa2149 100644 (file)
@@ -20,6 +20,7 @@
 #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"
 
index 81dca7a3a317415c7ed1f4a782575d6872b23e95..a92fa5a3ff42a87495fc86e6798eccb93a07e74a 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/irq.h>
 #include <linux/irqdomain.h>
 #include <linux/msi.h>
+#include "../include/mc-bus.h"
 #include "../include/mc-cmd.h"
 #include "fsl-mc-private.h"
 
index e5839992e1280c4b86211e176e4a9dcb2dd11c6c..7f5406f7590840a462d7bb01800444baef6e3741 100644 (file)
 #define _FSL_MC_PRIVATE_H_
 
 #include "../include/mc.h"
-#include <linux/mutex.h>
-
-/**
- * Maximum number of total IRQs that can be pre-allocated for an MC bus'
- * IRQ pool
- */
-#define FSL_MC_IRQ_POOL_MAX_TOTAL_IRQS 256
-
-/**
- * struct fsl_mc_resource_pool - Pool of MC resources of a given
- * type
- * @type: type of resources in the pool
- * @max_count: maximum number of resources in the pool
- * @free_count: number of free resources in the pool
- * @mutex: mutex to serialize access to the pool's free list
- * @free_list: anchor node of list of free resources in the pool
- * @mc_bus: pointer to the MC bus that owns this resource pool
- */
-struct fsl_mc_resource_pool {
-       enum fsl_mc_pool_type type;
-       int max_count;
-       int free_count;
-       struct mutex mutex;     /* serializes access to free_list */
-       struct list_head free_list;
-       struct fsl_mc_bus *mc_bus;
-};
-
-/**
- * struct fsl_mc_bus - logical bus that corresponds to a physical DPRC
- * @mc_dev: fsl-mc device for the bus device itself.
- * @resource_pools: array of resource pools (one pool per resource type)
- * for this MC bus. These resources represent allocatable entities
- * from the physical DPRC.
- * @irq_resources: Pointer to array of IRQ objects for the IRQ pool
- * @scan_mutex: Serializes bus scanning
- * @dprc_attr: DPRC attributes
- */
-struct fsl_mc_bus {
-       struct fsl_mc_device mc_dev;
-       struct fsl_mc_resource_pool resource_pools[FSL_MC_NUM_POOL_TYPES];
-       struct fsl_mc_device_irq *irq_resources;
-       struct mutex scan_mutex;    /* serializes bus scanning */
-       struct dprc_attributes dprc_attr;
-};
-
-#define to_fsl_mc_bus(_mc_dev) \
-       container_of(_mc_dev, struct fsl_mc_bus, mc_dev)
 
 int __must_check fsl_mc_device_add(struct fsl_mc_obj_desc *obj_desc,
                                   struct fsl_mc_io *mc_io,
@@ -74,10 +27,6 @@ int __init fsl_mc_allocator_driver_init(void);
 
 void fsl_mc_allocator_driver_exit(void);
 
-void fsl_mc_init_all_resource_pools(struct fsl_mc_device *mc_bus_dev);
-
-void fsl_mc_cleanup_all_resource_pools(struct fsl_mc_device *mc_bus_dev);
-
 int __must_check fsl_mc_resource_allocate(struct fsl_mc_bus *mc_bus,
                                          enum fsl_mc_pool_type pool_type,
                                          struct fsl_mc_resource
@@ -94,14 +43,6 @@ int __init its_fsl_mc_msi_init(void);
 
 void its_fsl_mc_msi_cleanup(void);
 
-int fsl_mc_find_msi_domain(struct device *mc_platform_dev,
-                          struct irq_domain **mc_msi_domain);
-
-int fsl_mc_populate_irq_pool(struct fsl_mc_bus *mc_bus,
-                            unsigned int irq_count);
-
-void fsl_mc_cleanup_irq_pool(struct fsl_mc_bus *mc_bus);
-
 int __must_check fsl_create_mc_io(struct device *dev,
                                  phys_addr_t mc_portal_phys_addr,
                                  u32 mc_portal_size,
@@ -110,6 +51,4 @@ int __must_check fsl_create_mc_io(struct device *dev,
 
 void fsl_destroy_mc_io(struct fsl_mc_io *mc_io);
 
-bool fsl_mc_is_root_dprc(struct device *dev);
-
 #endif /* _FSL_MC_PRIVATE_H_ */
index 865d385175086115daacf5723b32188253f79044..49127acb85b2a6a3e75c6e5ecf28b5370afd7e24 100644 (file)
@@ -16,6 +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"
 
 static struct irq_chip its_msi_irq_chip = {
index ec2835fb2a83ab8255ab0d4f2e6d28d9e145d8f9..d66b87f0903b031b8835a7a53028c44a3a9e248c 100644 (file)
@@ -31,6 +31,7 @@
  */
 
 #include <linux/io.h>
+#include "../include/mc-bus.h"
 #include "../include/mc-sys.h"
 
 #include "fsl-mc-private.h"
diff --git a/drivers/staging/fsl-mc/include/mc-bus.h b/drivers/staging/fsl-mc/include/mc-bus.h
new file mode 100644 (file)
index 0000000..a79a679
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Freescale Management Complex (MC) bus declarations
+ *
+ * Copyright (C) 2014-2016 Freescale Semiconductor, Inc.
+ * Author: German Rivera <German.Rivera@freescale.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+#ifndef _FSL_MC_MCBUS_H_
+#define _FSL_MC_MCBUS_H_
+
+#include "../include/mc.h"
+#include <linux/mutex.h>
+
+/**
+ * Maximum number of total IRQs that can be pre-allocated for an MC bus'
+ * IRQ pool
+ */
+#define FSL_MC_IRQ_POOL_MAX_TOTAL_IRQS 256
+
+/**
+ * struct fsl_mc_resource_pool - Pool of MC resources of a given
+ * type
+ * @type: type of resources in the pool
+ * @max_count: maximum number of resources in the pool
+ * @free_count: number of free resources in the pool
+ * @mutex: mutex to serialize access to the pool's free list
+ * @free_list: anchor node of list of free resources in the pool
+ * @mc_bus: pointer to the MC bus that owns this resource pool
+ */
+struct fsl_mc_resource_pool {
+       enum fsl_mc_pool_type type;
+       int max_count;
+       int free_count;
+       struct mutex mutex;     /* serializes access to free_list */
+       struct list_head free_list;
+       struct fsl_mc_bus *mc_bus;
+};
+
+/**
+ * struct fsl_mc_bus - logical bus that corresponds to a physical DPRC
+ * @mc_dev: fsl-mc device for the bus device itself.
+ * @resource_pools: array of resource pools (one pool per resource type)
+ * for this MC bus. These resources represent allocatable entities
+ * from the physical DPRC.
+ * @irq_resources: Pointer to array of IRQ objects for the IRQ pool
+ * @scan_mutex: Serializes bus scanning
+ * @dprc_attr: DPRC attributes
+ */
+struct fsl_mc_bus {
+       struct fsl_mc_device mc_dev;
+       struct fsl_mc_resource_pool resource_pools[FSL_MC_NUM_POOL_TYPES];
+       struct fsl_mc_device_irq *irq_resources;
+       struct mutex scan_mutex;    /* serializes bus scanning */
+       struct dprc_attributes dprc_attr;
+};
+
+#define to_fsl_mc_bus(_mc_dev) \
+       container_of(_mc_dev, struct fsl_mc_bus, mc_dev)
+
+int fsl_mc_find_msi_domain(struct device *mc_platform_dev,
+                          struct irq_domain **mc_msi_domain);
+
+int fsl_mc_populate_irq_pool(struct fsl_mc_bus *mc_bus,
+                            unsigned int irq_count);
+
+void fsl_mc_cleanup_irq_pool(struct fsl_mc_bus *mc_bus);
+
+void fsl_mc_init_all_resource_pools(struct fsl_mc_device *mc_bus_dev);
+
+void fsl_mc_cleanup_all_resource_pools(struct fsl_mc_device *mc_bus_dev);
+
+bool fsl_mc_is_root_dprc(struct device *dev);
+
+#endif /* _FSL_MC_MCBUS_H_ */