b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 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 |
| 5 | |
| 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. |
| 10 | |
| 11 | Signed-off-by: Bharat Bhushan <Bharat.Bhushan@nxp.com> |
| 12 | Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> |
| 13 | --- |
| 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(-) |
| 19 | |
| 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); |
| 30 | |
| 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: |
| 34 | } |
| 35 | |
| 36 | static int get_dprc_icid(struct fsl_mc_io *mc_io, |
| 37 | - int container_id, u16 *icid) |
| 38 | + int container_id, u32 *icid) |
| 39 | { |
| 40 | struct dprc_attributes attr; |
| 41 | int error; |
| 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 { |
| 46 | /* response word 0 */ |
| 47 | __le32 container_id; |
| 48 | - __le16 icid; |
| 49 | - __le16 pad; |
| 50 | + __le32 icid; |
| 51 | /* response word 1 */ |
| 52 | __le32 options; |
| 53 | __le32 portal_id; |
| 54 | @@ -320,7 +319,7 @@ int dprc_clear_irq_status(struct fsl_mc_ |
| 55 | */ |
| 56 | struct dprc_attributes { |
| 57 | int container_id; |
| 58 | - u16 icid; |
| 59 | + u32 icid; |
| 60 | int portal_id; |
| 61 | u64 options; |
| 62 | }; |
| 63 | --- a/include/linux/fsl/mc.h |
| 64 | +++ b/include/linux/fsl/mc.h |
| 65 | @@ -188,7 +188,7 @@ struct fsl_mc_device { |
| 66 | struct device dev; |
| 67 | u64 dma_mask; |
| 68 | u16 flags; |
| 69 | - u16 icid; |
| 70 | + u32 icid; |
| 71 | u16 mc_handle; |
| 72 | struct fsl_mc_io *mc_io; |
| 73 | struct fsl_mc_obj_desc obj_desc; |