mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 08:51:13 +00:00
74 lines
2.2 KiB
Diff
74 lines
2.2 KiB
Diff
|
From 7c5fca3084c38905df08b8f33cf14ad21ab41b77 Mon Sep 17 00:00:00 2001
|
||
|
From: Laurentiu Tudor <laurentiu.tudor@nxp.com>
|
||
|
Date: Mon, 16 Apr 2018 11:54:46 +0300
|
||
|
Subject: [PATCH] bus: fsl-mc: Extend ICID size from 16bit to 32bit
|
||
|
|
||
|
Extend the ICID from 16-bit to 32-bit.
|
||
|
Primary reason for this is enabling DPAA2 drivers
|
||
|
in Virtual Machine where device-id range is defined
|
||
|
for DPAA2 devices is 0x10000-0x20000.
|
||
|
|
||
|
Signed-off-by: Bharat Bhushan <Bharat.Bhushan@nxp.com>
|
||
|
Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
|
||
|
---
|
||
|
drivers/bus/fsl-mc/dprc.c | 2 +-
|
||
|
drivers/bus/fsl-mc/fsl-mc-bus.c | 2 +-
|
||
|
drivers/bus/fsl-mc/fsl-mc-private.h | 5 ++---
|
||
|
include/linux/fsl/mc.h | 2 +-
|
||
|
4 files changed, 5 insertions(+), 6 deletions(-)
|
||
|
|
||
|
--- a/drivers/bus/fsl-mc/dprc.c
|
||
|
+++ b/drivers/bus/fsl-mc/dprc.c
|
||
|
@@ -322,7 +322,7 @@ int dprc_get_attributes(struct fsl_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);
|
||
|
|
||
|
--- a/drivers/bus/fsl-mc/fsl-mc-bus.c
|
||
|
+++ b/drivers/bus/fsl-mc/fsl-mc-bus.c
|
||
|
@@ -489,7 +489,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;
|
||
|
--- a/drivers/bus/fsl-mc/fsl-mc-private.h
|
||
|
+++ b/drivers/bus/fsl-mc/fsl-mc-private.h
|
||
|
@@ -157,8 +157,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;
|
||
|
@@ -320,7 +319,7 @@ int dprc_clear_irq_status(struct fsl_mc_
|
||
|
*/
|
||
|
struct dprc_attributes {
|
||
|
int container_id;
|
||
|
- u16 icid;
|
||
|
+ u32 icid;
|
||
|
int portal_id;
|
||
|
u64 options;
|
||
|
};
|
||
|
--- a/include/linux/fsl/mc.h
|
||
|
+++ b/include/linux/fsl/mc.h
|
||
|
@@ -188,7 +188,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;
|