layerscape: add patches-5.4
[openwrt/openwrt.git] / target / linux / layerscape / patches-5.4 / 701-net-0143-bus-fsl-mc-add-support-for-dpdmux-device-type.patch
1 From 5b4e5d281abfa29cf3808b4a3a3ab994f80d6cca Mon Sep 17 00:00:00 2001
2 From: Razvan Stefanescu <razvan.stefanescu@nxp.com>
3 Date: Tue, 24 Apr 2018 14:51:56 +0300
4 Subject: [PATCH] bus: fsl-mc: add support for dpdmux device type
5
6 Signed-off-by: Razvan Stefanescu <razvan.stefanescu@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 @@ -270,6 +270,10 @@ struct device_type fsl_mc_bus_dpsw_type
15 .name = "fsl_mc_bus_dpsw"
16 };
17
18 +struct device_type fsl_mc_bus_dpdmux_type = {
19 + .name = "fsl_mc_bus_dpdmux"
20 +};
21 +
22 struct device_type fsl_mc_bus_dpbp_type = {
23 .name = "fsl_mc_bus_dpbp"
24 };
25 @@ -304,6 +308,7 @@ static struct device_type *fsl_mc_get_de
26 { &fsl_mc_bus_dpni_type, "dpni" },
27 { &fsl_mc_bus_dpio_type, "dpio" },
28 { &fsl_mc_bus_dpsw_type, "dpsw" },
29 + { &fsl_mc_bus_dpdmux_type, "dpdmux" },
30 { &fsl_mc_bus_dpbp_type, "dpbp" },
31 { &fsl_mc_bus_dpcon_type, "dpcon" },
32 { &fsl_mc_bus_dpmcp_type, "dpmcp" },
33 --- a/include/linux/fsl/mc.h
34 +++ b/include/linux/fsl/mc.h
35 @@ -416,6 +416,7 @@ extern struct device_type fsl_mc_bus_dpr
36 extern struct device_type fsl_mc_bus_dpni_type;
37 extern struct device_type fsl_mc_bus_dpio_type;
38 extern struct device_type fsl_mc_bus_dpsw_type;
39 +extern struct device_type fsl_mc_bus_dpdmux_type;
40 extern struct device_type fsl_mc_bus_dpbp_type;
41 extern struct device_type fsl_mc_bus_dpcon_type;
42 extern struct device_type fsl_mc_bus_dpmcp_type;
43 @@ -443,6 +444,11 @@ static inline bool is_fsl_mc_bus_dpsw(co
44 return mc_dev->dev.type == &fsl_mc_bus_dpsw_type;
45 }
46
47 +static inline bool is_fsl_mc_bus_dpdmux(const struct fsl_mc_device *mc_dev)
48 +{
49 + return mc_dev->dev.type == &fsl_mc_bus_dpdmux_type;
50 +}
51 +
52 static inline bool is_fsl_mc_bus_dpbp(const struct fsl_mc_device *mc_dev)
53 {
54 return mc_dev->dev.type == &fsl_mc_bus_dpbp_type;