Skip to contentSkip to conversation

pinctrl: imx7: move soc info to data section

PATCH New Peng Fan 1 participant 3 messages May 30, 2020

Subsystems (4)
lore
Share & tools
lore

Peng Fan

author
#0 lore raw

PATCH 1/3 pinctrl: imx7: move soc info to data section

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.

---
 drivers/pinctrl/nxp/pinctrl-imx7.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/nxp/pinctrl-imx7.c +1 -1
index 769d428dda..66b58ba472 100644
@@ -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,
Signature · 1 line
2.16.4
author
#1 lore raw

PATCH 2/3 pinctrl: imx8m: move soc info to data section

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.

---
 drivers/pinctrl/nxp/pinctrl-imx8m.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/nxp/pinctrl-imx8m.c +1 -1
index 5b7cbb69ae..0626fde58f 100644
@@ -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)
 {
Signature · 1 line
2.16.4
author
#2 lore raw

PATCH 3/3 pinctrl: imx5: move soc info to data section

In reply to Peng Fan

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.

---
 drivers/pinctrl/nxp/pinctrl-imx5.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/nxp/pinctrl-imx5.c +1 -1
index 5d17380919..9c3423bef3 100644
@@ -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)
 {
Signature · 1 line
2.16.4