0ab2421c4731883d50e9f2b72d58bc1703192b9a
[openwrt/openwrt.git] /
1 From 6de672cdae08f6dbd94c115481f3472a7af50c19 Mon Sep 17 00:00:00 2001
2 From: Ioana Ciornei <ioana.ciornei@nxp.com>
3 Date: Wed, 25 Apr 2018 13:35:16 +0300
4 Subject: [PATCH] bus: fsl-mc: add support for dpdcei device type
5
6 Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
7 ---
8 drivers/bus/fsl-mc/fsl-mc-bus.c | 5 +++++
9 include/linux/fsl/mc.h | 6 ++++++
10 2 files changed, 11 insertions(+)
11
12 --- a/drivers/bus/fsl-mc/fsl-mc-bus.c
13 +++ b/drivers/bus/fsl-mc/fsl-mc-bus.c
14 @@ -298,6 +298,10 @@ struct device_type fsl_mc_bus_dpseci_typ
15 .name = "fsl_mc_bus_dpseci"
16 };
17
18 +struct device_type fsl_mc_bus_dpdcei_type = {
19 + .name = "fsl_mc_bus_dpdcei"
20 +};
21 +
22 static struct device_type *fsl_mc_get_device_type(const char *type)
23 {
24 static const struct {
25 @@ -315,6 +319,7 @@ static struct device_type *fsl_mc_get_de
26 { &fsl_mc_bus_dpmac_type, "dpmac" },
27 { &fsl_mc_bus_dprtc_type, "dprtc" },
28 { &fsl_mc_bus_dpseci_type, "dpseci" },
29 + { &fsl_mc_bus_dpdcei_type, "dpdcei" },
30 { NULL, NULL }
31 };
32 int i;
33 --- a/include/linux/fsl/mc.h
34 +++ b/include/linux/fsl/mc.h
35 @@ -423,6 +423,7 @@ extern struct device_type fsl_mc_bus_dpm
36 extern struct device_type fsl_mc_bus_dpmac_type;
37 extern struct device_type fsl_mc_bus_dprtc_type;
38 extern struct device_type fsl_mc_bus_dpseci_type;
39 +extern struct device_type fsl_mc_bus_dpdcei_type;
40
41 static inline bool is_fsl_mc_bus_dprc(const struct fsl_mc_device *mc_dev)
42 {
43 @@ -479,6 +480,11 @@ static inline bool is_fsl_mc_bus_dpseci(
44 return mc_dev->dev.type == &fsl_mc_bus_dpseci_type;
45 }
46
47 +static inline bool is_fsl_mc_bus_dpdcei(const struct fsl_mc_device *mc_dev)
48 +{
49 + return mc_dev->dev.type == &fsl_mc_bus_dpdcei_type;
50 +}
51 +
52 /*
53 * Data Path Resource Container (DPRC) API
54 */