1 From 7c5fca3084c38905df08b8f33cf14ad21ab41b77 Mon Sep 17 00:00:00 2001
2 From: Laurentiu Tudor <laurentiu.tudor@nxp.com>
3 Date: Mon, 16 Apr 2018 11:54:46 +0300
4 Subject: [PATCH] bus: fsl-mc: Extend ICID size from 16bit to 32bit
6 Extend the ICID from 16-bit to 32-bit.
7 Primary reason for this is enabling DPAA2 drivers
8 in Virtual Machine where device-id range is defined
9 for DPAA2 devices is 0x10000-0x20000.
11 Signed-off-by: Bharat Bhushan <Bharat.Bhushan@nxp.com>
12 Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
14 drivers/bus/fsl-mc/dprc.c | 2 +-
15 drivers/bus/fsl-mc/fsl-mc-bus.c | 2 +-
16 drivers/bus/fsl-mc/fsl-mc-private.h | 5 ++---
17 include/linux/fsl/mc.h | 2 +-
18 4 files changed, 5 insertions(+), 6 deletions(-)
20 --- a/drivers/bus/fsl-mc/dprc.c
21 +++ b/drivers/bus/fsl-mc/dprc.c
22 @@ -322,7 +322,7 @@ int dprc_get_attributes(struct fsl_mc_io
23 /* retrieve response parameters */
24 rsp_params = (struct dprc_rsp_get_attributes *)cmd.params;
25 attr->container_id = le32_to_cpu(rsp_params->container_id);
26 - attr->icid = le16_to_cpu(rsp_params->icid);
27 + attr->icid = le32_to_cpu(rsp_params->icid);
28 attr->options = le32_to_cpu(rsp_params->options);
29 attr->portal_id = le32_to_cpu(rsp_params->portal_id);
31 --- a/drivers/bus/fsl-mc/fsl-mc-bus.c
32 +++ b/drivers/bus/fsl-mc/fsl-mc-bus.c
33 @@ -489,7 +489,7 @@ common_cleanup:
36 static int get_dprc_icid(struct fsl_mc_io *mc_io,
37 - int container_id, u16 *icid)
38 + int container_id, u32 *icid)
40 struct dprc_attributes attr;
42 --- a/drivers/bus/fsl-mc/fsl-mc-private.h
43 +++ b/drivers/bus/fsl-mc/fsl-mc-private.h
44 @@ -157,8 +157,7 @@ struct dprc_cmd_clear_irq_status {
45 struct dprc_rsp_get_attributes {
54 @@ -320,7 +319,7 @@ int dprc_clear_irq_status(struct fsl_mc_
56 struct dprc_attributes {
63 --- a/include/linux/fsl/mc.h
64 +++ b/include/linux/fsl/mc.h
65 @@ -188,7 +188,7 @@ struct fsl_mc_device {
72 struct fsl_mc_io *mc_io;
73 struct fsl_mc_obj_desc obj_desc;