Commit bb0297ccbd47de6bafc7bf54b31f7181bb346f69

Authored by Jagan Teki
Committed by Stefano Babic
1 parent 1f6e9bd2a7

pinctrl: imx6ul: Fix pinctrl data overlapped with DT area

before relocation pinctrl data BSS is overlapping DT area,
when .data is using uninitialized global variable,
imx6_pinctrl_soc_info. So assign them flags ZERO_OFFSET_VALID
to prevent BSS overlap

Suggested-by: Lokesh Vutla <lokeshvutla@ti.com>
Reported-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>

Showing 1 changed file with 6 additions and 1 deletions Side-by-side Diff

drivers/pinctrl/nxp/pinctrl-imx6.c
... ... @@ -13,6 +13,11 @@
13 13  
14 14 static struct imx_pinctrl_soc_info imx6_pinctrl_soc_info;
15 15  
  16 +/* FIXME Before reloaction, BSS is overlapped with DT area */
  17 +static struct imx_pinctrl_soc_info imx6ul_pinctrl_soc_info = {
  18 + .flags = ZERO_OFFSET_VALID,
  19 +};
  20 +
16 21 static struct imx_pinctrl_soc_info imx6_snvs_pinctrl_soc_info = {
17 22 .flags = ZERO_OFFSET_VALID,
18 23 };
... ... @@ -32,7 +37,7 @@
32 37 { .compatible = "fsl,imx6sll-iomuxc-snvs", .data = (ulong)&imx6_snvs_pinctrl_soc_info },
33 38 { .compatible = "fsl,imx6sll-iomuxc", .data = (ulong)&imx6_pinctrl_soc_info },
34 39 { .compatible = "fsl,imx6sx-iomuxc", .data = (ulong)&imx6_pinctrl_soc_info },
35   - { .compatible = "fsl,imx6ul-iomuxc", .data = (ulong)&imx6_pinctrl_soc_info },
  40 + { .compatible = "fsl,imx6ul-iomuxc", .data = (ulong)&imx6ul_pinctrl_soc_info },
36 41 { .compatible = "fsl,imx6ull-iomuxc-snvs", .data = (ulong)&imx6_snvs_pinctrl_soc_info },
37 42 { /* sentinel */ }
38 43 };