From patchwork Sat May 30 08:44:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 246869 List-Id: U-Boot discussion From: peng.fan at nxp.com (Peng Fan) Date: Sat, 30 May 2020 16:44:14 +0800 Subject: [PATCH 1/3] pinctrl: imx7: move soc info to data section Message-ID: <20200530084416.30987-1-peng.fan@nxp.com> The soc info without initialization value should be put into data section. The driver could be used before relocation, with it in BSS section could cause issue, since BSS section is not initializated and it might overwrite other areas that used by others, such as dtb. Signed-off-by: Peng Fan --- drivers/pinctrl/nxp/pinctrl-imx7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/nxp/pinctrl-imx7.c b/drivers/pinctrl/nxp/pinctrl-imx7.c index 769d428dda..66b58ba472 100644 --- a/drivers/pinctrl/nxp/pinctrl-imx7.c +++ b/drivers/pinctrl/nxp/pinctrl-imx7.c @@ -9,7 +9,7 @@ #include "pinctrl-imx.h" -static struct imx_pinctrl_soc_info imx7_pinctrl_soc_info; +static struct imx_pinctrl_soc_info imx7_pinctrl_soc_info __attribute__((section(".data"))); static struct imx_pinctrl_soc_info imx7_lpsr_pinctrl_soc_info = { .flags = ZERO_OFFSET_VALID, From patchwork Sat May 30 08:44:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 246870 List-Id: U-Boot discussion From: peng.fan at nxp.com (Peng Fan) Date: Sat, 30 May 2020 16:44:15 +0800 Subject: [PATCH 2/3] pinctrl: imx8m: move soc info to data section In-Reply-To: <20200530084416.30987-1-peng.fan@nxp.com> References: <20200530084416.30987-1-peng.fan@nxp.com> Message-ID: <20200530084416.30987-2-peng.fan@nxp.com> The soc info without initialization value should be put into data section. The driver could be used before relocation, with it in BSS section could cause issue, since BSS section is not initializated and it might overwrite other areas that used by others, such as dtb. Signed-off-by: Peng Fan --- drivers/pinctrl/nxp/pinctrl-imx8m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/nxp/pinctrl-imx8m.c b/drivers/pinctrl/nxp/pinctrl-imx8m.c index 5b7cbb69ae..0626fde58f 100644 --- a/drivers/pinctrl/nxp/pinctrl-imx8m.c +++ b/drivers/pinctrl/nxp/pinctrl-imx8m.c @@ -8,7 +8,7 @@ #include "pinctrl-imx.h" -static struct imx_pinctrl_soc_info imx8mq_pinctrl_soc_info; +static struct imx_pinctrl_soc_info imx8mq_pinctrl_soc_info __attribute__((section(".data"))); static int imx8mq_pinctrl_probe(struct udevice *dev) { From patchwork Sat May 30 08:44:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 246871 List-Id: U-Boot discussion From: peng.fan at nxp.com (Peng Fan) Date: Sat, 30 May 2020 16:44:16 +0800 Subject: [PATCH 3/3] pinctrl: imx5: move soc info to data section In-Reply-To: <20200530084416.30987-1-peng.fan@nxp.com> References: <20200530084416.30987-1-peng.fan@nxp.com> Message-ID: <20200530084416.30987-3-peng.fan@nxp.com> The soc info without initialization value should be put into data section. The driver could be used before relocation, with it in BSS section could cause issue, since BSS section is not initializated and it might overwrite other areas that used by others, such as dtb. Signed-off-by: Peng Fan --- drivers/pinctrl/nxp/pinctrl-imx5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/nxp/pinctrl-imx5.c b/drivers/pinctrl/nxp/pinctrl-imx5.c index 5d17380919..9c3423bef3 100644 --- a/drivers/pinctrl/nxp/pinctrl-imx5.c +++ b/drivers/pinctrl/nxp/pinctrl-imx5.c @@ -10,7 +10,7 @@ #include "pinctrl-imx.h" -static struct imx_pinctrl_soc_info imx5_pinctrl_soc_info; +static struct imx_pinctrl_soc_info imx5_pinctrl_soc_info __attribute__((section(".data"))); static int imx5_pinctrl_probe(struct udevice *dev) {