treewide: use wpad-basic-wolfssl as default
[openwrt/openwrt.git] / target / linux / layerscape / patches-5.4 / 701-net-0145-bus-fsl-mc-add-support-for-dpaiop-dpci-and-dpdmai-de.patch
1 From 0b8b5f7ff79b83ccfcb82fe0f571ddd77f577d19 Mon Sep 17 00:00:00 2001
2 From: Ioana Ciornei <ioana.ciornei@nxp.com>
3 Date: Thu, 3 May 2018 15:37:04 +0300
4 Subject: [PATCH] bus: fsl-mc: add support for dpaiop, dpci and dpdmai device
5 type
6
7 Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
8 ---
9 drivers/bus/fsl-mc/fsl-mc-bus.c | 15 +++++++++++++++
10 include/linux/fsl/mc.h | 18 ++++++++++++++++++
11 2 files changed, 33 insertions(+)
12
13 --- a/drivers/bus/fsl-mc/fsl-mc-bus.c
14 +++ b/drivers/bus/fsl-mc/fsl-mc-bus.c
15 @@ -302,6 +302,18 @@ struct device_type fsl_mc_bus_dpdcei_typ
16 .name = "fsl_mc_bus_dpdcei"
17 };
18
19 +struct device_type fsl_mc_bus_dpaiop_type = {
20 + .name = "fsl_mc_bus_dpaiop"
21 +};
22 +
23 +struct device_type fsl_mc_bus_dpci_type = {
24 + .name = "fsl_mc_bus_dpci"
25 +};
26 +
27 +struct device_type fsl_mc_bus_dpdmai_type = {
28 + .name = "fsl_mc_bus_dpdmai"
29 +};
30 +
31 static struct device_type *fsl_mc_get_device_type(const char *type)
32 {
33 static const struct {
34 @@ -320,6 +332,9 @@ static struct device_type *fsl_mc_get_de
35 { &fsl_mc_bus_dprtc_type, "dprtc" },
36 { &fsl_mc_bus_dpseci_type, "dpseci" },
37 { &fsl_mc_bus_dpdcei_type, "dpdcei" },
38 + { &fsl_mc_bus_dpaiop_type, "dpaiop" },
39 + { &fsl_mc_bus_dpci_type, "dpci" },
40 + { &fsl_mc_bus_dpdmai_type, "dpdmai" },
41 { NULL, NULL }
42 };
43 int i;
44 --- a/include/linux/fsl/mc.h
45 +++ b/include/linux/fsl/mc.h
46 @@ -424,6 +424,9 @@ extern struct device_type fsl_mc_bus_dpm
47 extern struct device_type fsl_mc_bus_dprtc_type;
48 extern struct device_type fsl_mc_bus_dpseci_type;
49 extern struct device_type fsl_mc_bus_dpdcei_type;
50 +extern struct device_type fsl_mc_bus_dpaiop_type;
51 +extern struct device_type fsl_mc_bus_dpci_type;
52 +extern struct device_type fsl_mc_bus_dpdmai_type;
53
54 static inline bool is_fsl_mc_bus_dprc(const struct fsl_mc_device *mc_dev)
55 {
56 @@ -485,6 +488,21 @@ static inline bool is_fsl_mc_bus_dpdcei(
57 return mc_dev->dev.type == &fsl_mc_bus_dpdcei_type;
58 }
59
60 +static inline bool is_fsl_mc_bus_dpaiop(const struct fsl_mc_device *mc_dev)
61 +{
62 + return mc_dev->dev.type == &fsl_mc_bus_dpaiop_type;
63 +}
64 +
65 +static inline bool is_fsl_mc_bus_dpci(const struct fsl_mc_device *mc_dev)
66 +{
67 + return mc_dev->dev.type == &fsl_mc_bus_dpci_type;
68 +}
69 +
70 +static inline bool is_fsl_mc_bus_dpdmai(const struct fsl_mc_device *mc_dev)
71 +{
72 + return mc_dev->dev.type == &fsl_mc_bus_dpdmai_type;
73 +}
74 +
75 /*
76 * Data Path Resource Container (DPRC) API
77 */