[PATCH 12/41] Convert CONFIG_FSL_ESDHC_PIN_MUX to Kconfig

Tom Rini trini at konsulko.com
Fri Dec 2 22:42:22 CET 2022


This converts the following to Kconfig:
   CONFIG_FSL_ESDHC_PIN_MUX

Signed-off-by: Tom Rini <trini at konsulko.com>
---
 configs/MPC837XERDB_defconfig | 1 +
 drivers/mmc/Kconfig           | 4 ++++
 drivers/mmc/fsl_esdhc_imx.c   | 2 +-
 include/configs/MPC837XERDB.h | 1 -
 4 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/configs/MPC837XERDB_defconfig b/configs/MPC837XERDB_defconfig
index 11a077d19ecc..fd89e8acc0e1 100644
--- a/configs/MPC837XERDB_defconfig
+++ b/configs/MPC837XERDB_defconfig
@@ -195,6 +195,7 @@ CONFIG_SYS_FSL_I2C_OFFSET=0x3000
 CONFIG_SYS_I2C_SLAVE=0x7F
 CONFIG_SYS_I2C_SPEED=400000
 CONFIG_FSL_ESDHC=y
+CONFIG_FSL_ESDHC_PIN_MUX=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_FLASH_SHOW_PROGRESS=0
diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
index 5a5a31c75ab9..878f867c627b 100644
--- a/drivers/mmc/Kconfig
+++ b/drivers/mmc/Kconfig
@@ -891,6 +891,10 @@ config FSL_USDHC
 	help
 	  This enables the Ultra Secured Digital Host Controller enhancements
 
+config FSL_ESDHC_PIN_MUX
+	bool "Perform esdhc device-tree fixup"
+	depends on (FSL_ESDHC || FSL_ESDHC_IMX) && OF_LIBFDT
+
 endmenu
 
 config SYS_FSL_ERRATUM_ESDHC111
diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c
index 5ee3ce782313..66caf683f741 100644
--- a/drivers/mmc/fsl_esdhc_imx.c
+++ b/drivers/mmc/fsl_esdhc_imx.c
@@ -1360,7 +1360,7 @@ int fsl_esdhc_mmc_init(struct bd_info *bis)
 #if CONFIG_IS_ENABLED(OF_LIBFDT)
 __weak int esdhc_status_fixup(void *blob, const char *compat)
 {
-	if (IS_ENABLED(FSL_ESDHC_PIN_MUX) && !hwconfig("esdhc")) {
+	if (IS_ENABLED(CONFIG_FSL_ESDHC_PIN_MUX) && !hwconfig("esdhc")) {
 		do_fixup_by_compat(blob, compat, "status", "disabled",
 				sizeof("disabled"), 1);
 		return 1;
diff --git a/include/configs/MPC837XERDB.h b/include/configs/MPC837XERDB.h
index f312ffb37e23..dbfcdfb738b0 100644
--- a/include/configs/MPC837XERDB.h
+++ b/include/configs/MPC837XERDB.h
@@ -177,7 +177,6 @@
 #define CFG_SYS_PCIE2_IO_PHYS	0xD8000000
 
 #ifdef CONFIG_MMC
-#define CONFIG_FSL_ESDHC_PIN_MUX
 #define CFG_SYS_FSL_ESDHC_ADDR	CFG_SYS_MPC83xx_ESDHC_ADDR
 #endif
 
-- 
2.25.1



More information about the U-Boot mailing list