Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Bharat Bhushan and committed by
Greg Kroah-Hartman
273ee53d 0dadd952

+5 -6
+1 -1
drivers/bus/fsl-mc/dprc.c
··· 360 360 /* retrieve response parameters */ 361 361 rsp_params = (struct dprc_rsp_get_attributes *)cmd.params; 362 362 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); 364 364 attr->options = le32_to_cpu(rsp_params->options); 365 365 attr->portal_id = le32_to_cpu(rsp_params->portal_id); 366 366
+1 -1
drivers/bus/fsl-mc/fsl-mc-bus.c
··· 503 503 } 504 504 505 505 static int get_dprc_icid(struct fsl_mc_io *mc_io, 506 - int container_id, u16 *icid) 506 + int container_id, u32 *icid) 507 507 { 508 508 struct dprc_attributes attr; 509 509 int error;
+2 -3
drivers/bus/fsl-mc/fsl-mc-private.h
··· 159 159 struct dprc_rsp_get_attributes { 160 160 /* response word 0 */ 161 161 __le32 container_id; 162 - __le16 icid; 163 - __le16 pad; 162 + __le32 icid; 164 163 /* response word 1 */ 165 164 __le32 options; 166 165 __le32 portal_id; ··· 336 337 */ 337 338 struct dprc_attributes { 338 339 int container_id; 339 - u16 icid; 340 + u32 icid; 340 341 int portal_id; 341 342 u64 options; 342 343 };
+1 -1
include/linux/fsl/mc.h
··· 195 195 struct device dev; 196 196 u64 dma_mask; 197 197 u16 flags; 198 - u16 icid; 198 + u32 icid; 199 199 u16 mc_handle; 200 200 struct fsl_mc_io *mc_io; 201 201 struct fsl_mc_obj_desc obj_desc;