pinctrl: imx: Define imx6_pinctrl_soc_info in .data section
Subsystems (4)
PATCH v2 1/1 pinctrl: imx: Define imx6_pinctrl_soc_info in .data section
This commit is necessary to be able to re-use the pinctrl code in early SPL to properly configure pins.
The problem is that those "static" structures (without explicit initialization) are placed in the SDRAM area, which corresponds to u-boot proper (not even SPL).
Hence, when one wants to configure pins before relocation via DTS/DM, the board hangs (imx6q SoC powered one) as only OCRAM area is available (0x009xxxxx).
This commit prevents from this issue by moving the imx6_pinctrl_soc_info structure to data section (from BSS).
---
Changes in v2:
- Use __section(".data") instead of rewritting the code to use calloc() (less intrusive commit)
drivers/pinctrl/nxp/pinctrl-imx6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/nxp/pinctrl-imx6.c +1 -1
@@ -10,7 +10,7 @@#include "pinctrl-imx.h" -static struct imx_pinctrl_soc_info imx6_pinctrl_soc_info; +static struct imx_pinctrl_soc_info imx6_pinctrl_soc_info __section(".data");/* FIXME Before reloaction, BSS is overlapped with DT area */ static struct imx_pinctrl_soc_info imx6ul_pinctrl_soc_info = {
Signature · 1 line
2.11.0
PATCH v2 1/1 pinctrl: imx: Define imx6_pinctrl_soc_info in .data section
Quoted 51 lines
-----Original Message-----
From: Lukasz Majewski [mailto:lukma at denx.de]
Sent: 2019年4月23日 22:45
To: Stefano Babic <[email protected]>; u-boot at lists.denx.de; Fabio Estevam <[email protected]>; Fabio Estevam <[email protected]>; dl-uboot-imx <[email protected]>; Jagan Teki <[email protected]>; Adam Ford <[email protected]>
Cc: Lukasz Majewski <[email protected]>; Bin Meng <[email protected]>; Simon Glass <[email protected]>
Subject: [PATCH v2] pinctrl: imx: Defineimx6_pinctrl_soc_infoin .data sectionThis commit is necessary to be able to re-use the pinctrl code in early SPL to properly configure pins.
The problem is that those "static" structures (without explicit initialization) are placed in the SDRAM area, which corresponds to u-boot proper (not even SPL).
Hence, when one wants to configure pins before relocation via DTS/DM, the board hangs (imx6q SoC powered one) as only OCRAM area is available (0x009xxxxx).This commit prevents from this issue by moving the
imx6_pinctrl_soc_infostructure to data section (from BSS).Signed-off-by Lukasz Majewski <[email protected]>---
Changes in v2:
- Use__section(".data")instead of rewritting the code to usecalloc()(less intrusive commit)drivers/pinctrl/nxp/pinctrl-imx6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pinctrl/nxp/pinctrl-imx6.c +2
-1@@ -10,7 +10,7 @@#include "pinctrl-imx.h" -static struct imx_pinctrl_soc_info imx6_pinctrl_soc_info; +static struct imx_pinctrl_soc_info imx6_pinctrl_soc_info +__section (".data" ); /* FIXME Before reloaction, BSS is overlapped with DT area */ static struct
Quoted 1 line
imx_pinctrl_soc_infoimx6ul_pinctrl_soc_info= {
Quoted 2 lines
--
2.11.0
PATCH v2 1/1 pinctrl: imx: Define imx6_pinctrl_soc_info in .data section
In reply to Lukasz MajewskiQuoted 10 lines
This commit is necessary to be able to re-use the pinctrl code in early SPL to properly configure pins.
The problem is that those "static" structures (without explicit initialization) are placed in the SDRAM area, which corresponds to u-boot proper (not even SPL).
Hence, when one wants to configure pins before relocation via DTS/DM, the board hangs (imx6q SoC powered one) as only OCRAM area is available (0x009xxxxx).
This commit prevents from this issue by moving theimx6_pinctrl_soc_infostructure to data section (from BSS).
Quoted 2 lines
Signed-off-by Lukasz Majewski <[email protected]>Reviewed-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================