layerscape: add ls1088ardb device support
[openwrt/staging/lynxis/omap.git] / target / linux / layerscape / patches-4.4 / 7196-staging-fsl-mc-make-fsl_mc_get_root_dprc-public.patch
1 From 12b1317fb3ab5b56efd833fa3b22965adf1d2c96 Mon Sep 17 00:00:00 2001
2 From: Stuart Yoder <stuart.yoder@nxp.com>
3 Date: Fri, 15 Apr 2016 17:07:16 -0500
4 Subject: [PATCH 196/226] staging: fsl-mc: make fsl_mc_get_root_dprc public
5
6 this is needed by other components (e.g. vfio) to find
7 the root dprc
8
9 Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
10 ---
11 drivers/staging/fsl-mc/bus/mc-bus.c | 3 ++-
12 drivers/staging/fsl-mc/include/mc.h | 3 +++
13 2 files changed, 5 insertions(+), 1 deletion(-)
14
15 --- a/drivers/staging/fsl-mc/bus/mc-bus.c
16 +++ b/drivers/staging/fsl-mc/bus/mc-bus.c
17 @@ -358,7 +358,7 @@ EXPORT_SYMBOL_GPL(fsl_mc_bus_exists);
18 /**
19 * fsl_mc_get_root_dprc - function to traverse to the root dprc
20 */
21 -static void fsl_mc_get_root_dprc(struct device *dev,
22 +void fsl_mc_get_root_dprc(struct device *dev,
23 struct device **root_dprc_dev)
24 {
25 if (WARN_ON(!dev)) {
26 @@ -371,6 +371,7 @@ static void fsl_mc_get_root_dprc(struct
27 *root_dprc_dev = (*root_dprc_dev)->parent;
28 }
29 }
30 +EXPORT_SYMBOL_GPL(fsl_mc_get_root_dprc);
31
32 static int get_dprc_attr(struct fsl_mc_io *mc_io,
33 int container_id, struct dprc_attributes *attr)
34 --- a/drivers/staging/fsl-mc/include/mc.h
35 +++ b/drivers/staging/fsl-mc/include/mc.h
36 @@ -191,6 +191,9 @@ void fsl_mc_driver_unregister(struct fsl
37
38 bool fsl_mc_bus_exists(void);
39
40 +void fsl_mc_get_root_dprc(struct device *dev,
41 + struct device **root_dprc_dev);
42 +
43 int __must_check fsl_mc_portal_allocate(struct fsl_mc_device *mc_dev,
44 u16 mc_io_flags,
45 struct fsl_mc_io **new_mc_io);