1 From 642686661c3324b4ae6c14f1cdbd2ea613525f09 Mon Sep 17 00:00:00 2001
2 From: Razvan Stefanescu <razvan.stefanescu@nxp.com>
3 Date: Fri, 13 Apr 2018 09:57:12 +0300
4 Subject: [PATCH] staging: fsl-dpaa2/mac: make compatible with upstream MC bus
6 Update the mc.h include path.
7 Rename struct mc_command to struct fsl_mc_command.
9 Signed-off-by: Razvan Stefanescu <razvan.stefanescu@nxp.com>
11 drivers/staging/fsl-dpaa2/mac/dpmac.c | 34 +++++++++++++++++-----------------
12 drivers/staging/fsl-dpaa2/mac/mac.c | 2 +-
13 2 files changed, 18 insertions(+), 18 deletions(-)
15 --- a/drivers/staging/fsl-dpaa2/mac/dpmac.c
16 +++ b/drivers/staging/fsl-dpaa2/mac/dpmac.c
18 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
19 * POSSIBILITY OF SUCH DAMAGE.
21 -#include "../../fsl-mc/include/mc.h"
22 +#include <linux/fsl/mc.h>
24 #include "dpmac-cmd.h"
26 @@ -56,7 +56,7 @@ int dpmac_open(struct fsl_mc_io *mc_io,
29 struct dpmac_cmd_open *cmd_params;
30 - struct mc_command cmd = { 0 };
31 + struct fsl_mc_command cmd = { 0 };
35 @@ -92,7 +92,7 @@ int dpmac_close(struct fsl_mc_io *mc_io,
39 - struct mc_command cmd = { 0 };
40 + struct fsl_mc_command cmd = { 0 };
43 cmd.header = mc_encode_cmd_header(DPMAC_CMDID_CLOSE, cmd_flags,
44 @@ -128,7 +128,7 @@ int dpmac_create(struct fsl_mc_io *mc_io
47 struct dpmac_cmd_create *cmd_params;
48 - struct mc_command cmd = { 0 };
49 + struct fsl_mc_command cmd = { 0 };
53 @@ -170,7 +170,7 @@ int dpmac_destroy(struct fsl_mc_io *mc_i
56 struct dpmac_cmd_destroy *cmd_params;
57 - struct mc_command cmd = { 0 };
58 + struct fsl_mc_command cmd = { 0 };
61 cmd.header = mc_encode_cmd_header(DPMAC_CMDID_DESTROY,
62 @@ -205,7 +205,7 @@ int dpmac_set_irq_enable(struct fsl_mc_i
65 struct dpmac_cmd_set_irq_enable *cmd_params;
66 - struct mc_command cmd = { 0 };
67 + struct fsl_mc_command cmd = { 0 };
70 cmd.header = mc_encode_cmd_header(DPMAC_CMDID_SET_IRQ_ENABLE,
71 @@ -237,7 +237,7 @@ int dpmac_get_irq_enable(struct fsl_mc_i
73 struct dpmac_cmd_get_irq_enable *cmd_params;
74 struct dpmac_rsp_get_irq_enable *rsp_params;
75 - struct mc_command cmd = { 0 };
76 + struct fsl_mc_command cmd = { 0 };
80 @@ -282,7 +282,7 @@ int dpmac_set_irq_mask(struct fsl_mc_io
83 struct dpmac_cmd_set_irq_mask *cmd_params;
84 - struct mc_command cmd = { 0 };
85 + struct fsl_mc_command cmd = { 0 };
88 cmd.header = mc_encode_cmd_header(DPMAC_CMDID_SET_IRQ_MASK,
89 @@ -317,7 +317,7 @@ int dpmac_get_irq_mask(struct fsl_mc_io
91 struct dpmac_cmd_get_irq_mask *cmd_params;
92 struct dpmac_rsp_get_irq_mask *rsp_params;
93 - struct mc_command cmd = { 0 };
94 + struct fsl_mc_command cmd = { 0 };
98 @@ -360,7 +360,7 @@ int dpmac_get_irq_status(struct fsl_mc_i
100 struct dpmac_cmd_get_irq_status *cmd_params;
101 struct dpmac_rsp_get_irq_status *rsp_params;
102 - struct mc_command cmd = { 0 };
103 + struct fsl_mc_command cmd = { 0 };
106 /* prepare command */
107 @@ -403,7 +403,7 @@ int dpmac_clear_irq_status(struct fsl_mc
110 struct dpmac_cmd_clear_irq_status *cmd_params;
111 - struct mc_command cmd = { 0 };
112 + struct fsl_mc_command cmd = { 0 };
114 /* prepare command */
115 cmd.header = mc_encode_cmd_header(DPMAC_CMDID_CLEAR_IRQ_STATUS,
116 @@ -433,7 +433,7 @@ int dpmac_get_attributes(struct fsl_mc_i
117 struct dpmac_attr *attr)
119 struct dpmac_rsp_get_attributes *rsp_params;
120 - struct mc_command cmd = { 0 };
121 + struct fsl_mc_command cmd = { 0 };
124 /* prepare command */
125 @@ -471,7 +471,7 @@ int dpmac_get_link_cfg(struct fsl_mc_io
126 struct dpmac_link_cfg *cfg)
128 struct dpmac_rsp_get_link_cfg *rsp_params;
129 - struct mc_command cmd = { 0 };
130 + struct fsl_mc_command cmd = { 0 };
133 /* prepare command */
134 @@ -506,7 +506,7 @@ int dpmac_set_link_state(struct fsl_mc_i
135 struct dpmac_link_state *link_state)
137 struct dpmac_cmd_set_link_state *cmd_params;
138 - struct mc_command cmd = { 0 };
139 + struct fsl_mc_command cmd = { 0 };
141 /* prepare command */
142 cmd.header = mc_encode_cmd_header(DPMAC_CMDID_SET_LINK_STATE,
143 @@ -539,7 +539,7 @@ int dpmac_get_counter(struct fsl_mc_io *
145 struct dpmac_cmd_get_counter *dpmac_cmd;
146 struct dpmac_rsp_get_counter *dpmac_rsp;
147 - struct mc_command cmd = { 0 };
148 + struct fsl_mc_command cmd = { 0 };
151 /* prepare command */
152 @@ -567,7 +567,7 @@ int dpmac_set_port_mac_addr(struct fsl_m
155 struct dpmac_cmd_set_port_mac_addr *dpmac_cmd;
156 - struct mc_command cmd = { 0 };
157 + struct fsl_mc_command cmd = { 0 };
159 /* prepare command */
160 cmd.header = mc_encode_cmd_header(DPMAC_CMDID_SET_PORT_MAC_ADDR,
161 @@ -600,7 +600,7 @@ int dpmac_get_api_version(struct fsl_mc_
164 struct dpmac_rsp_get_api_version *rsp_params;
165 - struct mc_command cmd = { 0 };
166 + struct fsl_mc_command cmd = { 0 };
169 cmd.header = mc_encode_cmd_header(DPMAC_CMDID_GET_API_VERSION,
170 --- a/drivers/staging/fsl-dpaa2/mac/mac.c
171 +++ b/drivers/staging/fsl-dpaa2/mac/mac.c
173 #include <linux/phy.h>
174 #include <linux/phy_fixed.h>
176 -#include "../../fsl-mc/include/mc.h"
177 +#include <linux/fsl/mc.h>
180 #include "dpmac-cmd.h"