]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
pinctrl: imx: Define imx6_pinctrl_soc_info in .data section
authorLukasz Majewski <lukma@denx.de>
Tue, 23 Apr 2019 14:44:51 +0000 (16:44 +0200)
committerStefano Babic <sbabic@denx.de>
Tue, 11 Jun 2019 08:43:00 +0000 (10:43 +0200)
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).

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
drivers/pinctrl/nxp/pinctrl-imx6.c

index d7c95bb7387b443195c6791e363fb50e65a3f8b9..0c1e7a9c05aee94b4585d98b7d99c0bd1f0c7972 100644 (file)
@@ -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 = {