> -----Original Message----- > From: Lukasz Majewski [mailto:lu...@denx.de] > Sent: 2019年4月23日 22:45 > To: Stefano Babic <sba...@denx.de>; u-boot@lists.denx.de; Fabio Estevam > <feste...@gmail.com>; Fabio Estevam <fabio.este...@nxp.com>; > dl-uboot-imx <uboot-...@nxp.com>; Jagan Teki > <ja...@amarulasolutions.com>; Adam Ford <aford...@gmail.com> > Cc: Lukasz Majewski <lu...@denx.de>; Bin Meng <bmeng...@gmail.com>; > Simon Glass <s...@chromium.org> > Subject: [PATCH v2] 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). > > Signed-off-by: Lukasz Majewski <lu...@denx.de> > > --- > > 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(-) > > diff --git a/drivers/pinctrl/nxp/pinctrl-imx6.c > b/drivers/pinctrl/nxp/pinctrl-imx6.c > index d7c95bb738..0c1e7a9c05 100644 > --- a/drivers/pinctrl/nxp/pinctrl-imx6.c > +++ b/drivers/pinctrl/nxp/pinctrl-imx6.c > @@ -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 = {
Reviewed-by: Peng Fan <peng....@nxp.com> > -- > 2.11.0 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot