From fa423df32ca99e923339d58ea679c074446fae0c Mon Sep 17 00:00:00 2001 From: Cristian Sovaiala Date: Thu, 13 Apr 2017 16:31:08 +0300 Subject: Added missing fields to dprc_rsp_get_obj_region structure 'type' and 'flags' fields were missing from dprc_rsp_get_obj_region structure therefore the MC Bus driver was not receiving proper flags from MC like DPRC_REGION_CACHEABLE. Signed-off-by: Cristian Sovaiala diff --git a/drivers/staging/fsl-mc/bus/dprc-cmd.h b/drivers/staging/fsl-mc/bus/dprc-cmd.h index 24fe4fb..b7d8c34 100644 --- a/drivers/staging/fsl-mc/bus/dprc-cmd.h +++ b/drivers/staging/fsl-mc/bus/dprc-cmd.h @@ -354,11 +354,16 @@ struct dprc_cmd_get_obj_region { struct dprc_rsp_get_obj_region { /* response word 0 */ - __le64 pad; + __le64 pad0; /* response word 1 */ - __le64 base_addr; + __le32 base_addr; + __le32 pad1; /* response word 2 */ __le32 size; + u8 type; + u8 pad2[3]; + /* response word 3 */ + __le32 flags; }; struct dprc_cmd_set_obj_label { diff --git a/drivers/staging/fsl-mc/bus/dprc.c b/drivers/staging/fsl-mc/bus/dprc.c index 61092a0..764cd3fb 100644 --- a/drivers/staging/fsl-mc/bus/dprc.c +++ b/drivers/staging/fsl-mc/bus/dprc.c @@ -752,8 +752,10 @@ int dprc_get_obj_region(struct fsl_mc_io *mc_io, /* retrieve response parameters */ rsp_params = (struct dprc_rsp_get_obj_region *)cmd.params; - region_desc->base_offset = le64_to_cpu(rsp_params->base_addr); + region_desc->base_offset = le32_to_cpu(rsp_params->base_addr); region_desc->size = le32_to_cpu(rsp_params->size); + region_desc->type = rsp_params->type; + region_desc->flags = le32_to_cpu(rsp_params->flags); return 0; } -- cgit v0.10.2