layerscape: add patches-5.4
[openwrt/staging/mkresin.git] / target / linux / layerscape / patches-5.4 / 701-net-0139-bus-fsl-mc-added-missing-fields-to-dprc_rsp_get_obj_.patch
1 From 7c72e64115a9145df5b8faf2182ef17b065261a9 Mon Sep 17 00:00:00 2001
2 From: Laurentiu Tudor <laurentiu.tudor@nxp.com>
3 Date: Fri, 13 Apr 2018 15:04:45 +0300
4 Subject: [PATCH] bus: fsl-mc: added missing fields to dprc_rsp_get_obj_region
5 structure
6
7 'type' and 'flags' fields were missing from dprc_rsp_get_obj_region
8 structure therefore the MC Bus driver was not receiving proper flags
9 from MC like DPRC_REGION_CACHEABLE.
10
11 Signed-off-by: Cristian Sovaiala <cristian.sovaiala@freescale.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-private.h | 5 +++--
16 2 files changed, 5 insertions(+), 2 deletions(-)
17
18 --- a/drivers/bus/fsl-mc/dprc.c
19 +++ b/drivers/bus/fsl-mc/dprc.c
20 @@ -524,6 +524,8 @@ int dprc_get_obj_region(struct fsl_mc_io
21 rsp_params = (struct dprc_rsp_get_obj_region *)cmd.params;
22 region_desc->base_offset = le64_to_cpu(rsp_params->base_offset);
23 region_desc->size = le32_to_cpu(rsp_params->size);
24 + region_desc->type = rsp_params->type;
25 + region_desc->flags = le32_to_cpu(rsp_params->flags);
26 if (major_ver > 6 || (major_ver == 6 && minor_ver >= 3))
27 region_desc->base_address = le64_to_cpu(rsp_params->base_addr);
28 else
29 --- a/drivers/bus/fsl-mc/fsl-mc-private.h
30 +++ b/drivers/bus/fsl-mc/fsl-mc-private.h
31 @@ -207,12 +207,13 @@ struct dprc_cmd_get_obj_region {
32
33 struct dprc_rsp_get_obj_region {
34 /* response word 0 */
35 - __le64 pad;
36 + __le64 pad0;
37 /* response word 1 */
38 __le64 base_offset;
39 /* response word 2 */
40 __le32 size;
41 - __le32 pad2;
42 + u8 type;
43 + u8 pad2[3];
44 /* response word 3 */
45 __le32 flags;
46 __le32 pad3;