Skip to contentSkip to conversation

gpio: sunxi: Fix build with CONFIG_SPL_SERIAL=n

PATCH Applied Samuel Holland 2 participants 3 messages May 11, 2022 – Jun 27, 2022 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: sunxi: Fix build with CONFIG_SPL_SERIAL=n

This driver uses simple_strtol(), so it needs SPL_STRTO. Before commit 88ca8e26958b6 ("disk: Add an option for partitions in SPL"), SPL_STRTO was always selected indirectly. Now it is not, so select it here.

---

 drivers/gpio/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/gpio/Kconfig +1 -0
index 89068c7800..b955543e97 100644
@@ -347,6 +347,7 @@ config SANDBOX_GPIO_COUNT
 config SUNXI_GPIO
 	bool "Allwinner GPIO driver"
 	depends on ARCH_SUNXI
+	select SPL_STRTO if SPL
 	help
 	  Support the GPIO device in Allwinner SoCs.
 
Signature · 1 line
2.35.1
Reviewed-by on v1 1/1
#1 lore raw

On Tue, 10 May 2022 19:03:34 -0500
Samuel Holland <[email protected]> wrote:

Hi,

Quoted 5 lines

This driver uses simple_strtol(), so it needs SPL_STRTO. Before commit 88ca8e26958b6 ("disk: Add an option for partitions in SPL"), SPL_STRTO was always selected indirectly. Now it is not, so select it here.

From what I can see, CONFIG_MMC is the trigger, calling sunxi_name_to_gpio(), which is the actual user of simple_strtol() in the SPL. For the three boards not using MMC I don't see simple_strol() being mentioned in the objdump.
But I think this patch is a more robust solution (compared to tying it to MMC usage), so:

Cheers,
Andre

Quoted 17 lines

---

 drivers/gpio/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/gpio/Kconfig +1 -0
index 89068c7800..b955543e97 100644
@@ -347,6 +347,7 @@ config SANDBOX_GPIO_COUNT
 config SUNXI_GPIO
 	bool "Allwinner GPIO driver"
 	depends on ARCH_SUNXI
+	select SPL_STRTO if SPL
 	help
 	  Support the GPIO device in Allwinner SoCs.
 
#2 lore raw
In reply to Samuel Holland
Quoted 5 lines · On Tue, 10 May 2022 19:03:34 -0500 Samuel Holland <[email protected]> wrote:

This driver uses simple_strtol(), so it needs SPL_STRTO. Before commit 88ca8e26958b6 ("disk: Add an option for partitions in SPL"), SPL_STRTO was always selected indirectly. Now it is not, so select it here.

Applied to sunxi/master, for v2022.07.

Thanks,
Andre

Quoted 17 lines

---

 drivers/gpio/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/gpio/Kconfig +1 -0
index 89068c7800..b955543e97 100644
@@ -347,6 +347,7 @@ config SANDBOX_GPIO_COUNT
 config SUNXI_GPIO
 	bool "Allwinner GPIO driver"
 	depends on ARCH_SUNXI
+	select SPL_STRTO if SPL
 	help
 	  Support the GPIO device in Allwinner SoCs.