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
7 Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
9 drivers/bus/fsl-mc/fsl-mc-bus.c | 15 +++++++++++++++
10 include/linux/fsl/mc.h | 18 ++++++++++++++++++
11 2 files changed, 33 insertions(+)
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"
19 +struct device_type fsl_mc_bus_dpaiop_type = {
20 + .name = "fsl_mc_bus_dpaiop"
23 +struct device_type fsl_mc_bus_dpci_type = {
24 + .name = "fsl_mc_bus_dpci"
27 +struct device_type fsl_mc_bus_dpdmai_type = {
28 + .name = "fsl_mc_bus_dpdmai"
31 static struct device_type *fsl_mc_get_device_type(const char *type)
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" },
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;
54 static inline bool is_fsl_mc_bus_dprc(const struct fsl_mc_device *mc_dev)
56 @@ -485,6 +488,21 @@ static inline bool is_fsl_mc_bus_dpdcei(
57 return mc_dev->dev.type == &fsl_mc_bus_dpdcei_type;
60 +static inline bool is_fsl_mc_bus_dpaiop(const struct fsl_mc_device *mc_dev)
62 + return mc_dev->dev.type == &fsl_mc_bus_dpaiop_type;
65 +static inline bool is_fsl_mc_bus_dpci(const struct fsl_mc_device *mc_dev)
67 + return mc_dev->dev.type == &fsl_mc_bus_dpci_type;
70 +static inline bool is_fsl_mc_bus_dpdmai(const struct fsl_mc_device *mc_dev)
72 + return mc_dev->dev.type == &fsl_mc_bus_dpdmai_type;
76 * Data Path Resource Container (DPRC) API