Skip to content

Commit 273ee53

Browse files
bharatygregkh
authored andcommitted
bus/fsl-mc: Extend ICID size from 16bit to 32bit
In virtual machines the device-id range is defined between 0x10000-0x20000. The reason for using such a large range is to avoid overlapping with the PCI range. Reviewed-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Acked-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Bharat Bhushan <Bharat.Bhushan@nxp.com> Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Diana Craciun <diana.craciun@oss.nxp.com> Link: https://lore.kernel.org/r/20200929085441.17448-13-diana.craciun@oss.nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 0dadd95 commit 273ee53

4 files changed

Lines changed: 5 additions & 6 deletions

File tree

‎drivers/bus/fsl-mc/dprc.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ int dprc_get_attributes(struct fsl_mc_io *mc_io,
360360
/* retrieve response parameters */
361361
rsp_params = (struct dprc_rsp_get_attributes *)cmd.params;
362362
attr->container_id = le32_to_cpu(rsp_params->container_id);
363-
attr->icid = le16_to_cpu(rsp_params->icid);
363+
attr->icid = le32_to_cpu(rsp_params->icid);
364364
attr->options = le32_to_cpu(rsp_params->options);
365365
attr->portal_id = le32_to_cpu(rsp_params->portal_id);
366366

‎drivers/bus/fsl-mc/fsl-mc-bus.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ static int get_dprc_attr(struct fsl_mc_io *mc_io,
503503
}
504504

505505
static int get_dprc_icid(struct fsl_mc_io *mc_io,
506-
int container_id, u16 *icid)
506+
int container_id, u32 *icid)
507507
{
508508
struct dprc_attributes attr;
509509
int error;

‎drivers/bus/fsl-mc/fsl-mc-private.h‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,7 @@ struct dprc_cmd_clear_irq_status {
159159
struct dprc_rsp_get_attributes {
160160
/* response word 0 */
161161
__le32 container_id;
162-
__le16 icid;
163-
__le16 pad;
162+
__le32 icid;
164163
/* response word 1 */
165164
__le32 options;
166165
__le32 portal_id;
@@ -337,7 +336,7 @@ int dprc_clear_irq_status(struct fsl_mc_io *mc_io,
337336
*/
338337
struct dprc_attributes {
339338
int container_id;
340-
u16 icid;
339+
u32 icid;
341340
int portal_id;
342341
u64 options;
343342
};

‎include/linux/fsl/mc.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ struct fsl_mc_device {
195195
struct device dev;
196196
u64 dma_mask;
197197
u16 flags;
198-
u16 icid;
198+
u32 icid;
199199
u16 mc_handle;
200200
struct fsl_mc_io *mc_io;
201201
struct fsl_mc_obj_desc obj_desc;

0 commit comments

Comments
 (0)