[U-Boot] [PATCH 1/2] gpio: fix CONFIG_IS_ENABLED(DM_GPIO) for SPL

Baruch Siach baruch at tkos.co.il
Sun Nov 3 09:52:38 UTC 2019


There is currently no CONFIG_SPL_DM_GPIO, so CONFIG_IS_ENABLED(DM_GPIO)
is always false. As a result the sdhci driver can not use the DM gpio
API to read the card-detect signal in SPL. This breaks boot from SD card
on the SolidRun Clearfog platform since commit da18c62b6e ("mmc: sdhci:
Implement SDHCI card detect") that added sdhci_get_cd().

Add a blind CONFIG_SPL_DM_GPIO symbol that is enabled iff CONFIG_DM_GPIO
is. That makes CONFIG_IS_ENABLED(DM_GPIO) correct for SPL code.

Signed-off-by: Baruch Siach <baruch at tkos.co.il>
---
 drivers/gpio/Kconfig | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index c1ad5d64a35c..9bac341c5ed5 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -14,6 +14,11 @@ config DM_GPIO
 	  particular GPIOs that they provide. The uclass interface
 	  is defined in include/asm-generic/gpio.h.
 
+config SPL_DM_GPIO
+	bool
+	depends on DM_GPIO
+	default y
+
 config GPIO_HOG
 	bool "Enable GPIO hog support"
 	depends on DM_GPIO
-- 
2.24.0.rc1



More information about the U-Boot mailing list