bus/fsl-mc: Extend ICID size from 16bit to 32bit
authorBharat Bhushan <Bharat.Bhushan@nxp.com>
Tue, 29 Sep 2020 08:54:40 +0000 (11:54 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Oct 2020 14:05:02 +0000 (16:05 +0200)
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>
drivers/bus/fsl-mc/dprc.c
drivers/bus/fsl-mc/fsl-mc-bus.c
drivers/bus/fsl-mc/fsl-mc-private.h
include/linux/fsl/mc.h

index 2448a723eb28d22216aa16e34c8798baaae05f71..650808799a2934ab6cfc36d4c47e1d3c3cf9fbc8 100644 (file)
@@ -360,7 +360,7 @@ int dprc_get_attributes(struct fsl_mc_io *mc_io,
        /* retrieve response parameters */
        rsp_params = (struct dprc_rsp_get_attributes *)cmd.params;
        attr->container_id = le32_to_cpu(rsp_params->container_id);
-       attr->icid = le16_to_cpu(rsp_params->icid);
+       attr->icid = le32_to_cpu(rsp_params->icid);
        attr->options = le32_to_cpu(rsp_params->options);
        attr->portal_id = le32_to_cpu(rsp_params->portal_id);
 
index d53315f42dc2079ef97d768cff83dc3e33238327..76a6ee505d33de98c455d3cf457e67c8e70071c2 100644 (file)
@@ -503,7 +503,7 @@ common_cleanup:
 }
 
 static int get_dprc_icid(struct fsl_mc_io *mc_io,
-                        int container_id, u16 *icid)
+                        int container_id, u32 *icid)
 {
        struct dprc_attributes attr;
        int error;
index ffe709a3f0f8ffd2b6af0b398deebeac6ffc2555..3e9f9c778631f83ff0e525d0815257a8e3d09efe 100644 (file)
@@ -159,8 +159,7 @@ struct dprc_cmd_clear_irq_status {
 struct dprc_rsp_get_attributes {
        /* response word 0 */
        __le32 container_id;
-       __le16 icid;
-       __le16 pad;
+       __le32 icid;
        /* response word 1 */
        __le32 options;
        __le32 portal_id;
@@ -337,7 +336,7 @@ int dprc_clear_irq_status(struct fsl_mc_io *mc_io,
  */
 struct dprc_attributes {
        int container_id;
-       u16 icid;
+       u32 icid;
        int portal_id;
        u64 options;
 };
index f791fe38c2512ce2fe21a3d0338bf1e3df1c4652..db244874e83422625af8d835210232810b76b703 100644 (file)
@@ -195,7 +195,7 @@ struct fsl_mc_device {
        struct device dev;
        u64 dma_mask;
        u16 flags;
-       u16 icid;
+       u32 icid;
        u16 mc_handle;
        struct fsl_mc_io *mc_io;
        struct fsl_mc_obj_desc obj_desc;