[U-Boot] [PATCH v2 05/14] DM: mmc: Switch display5 board to use DM_MMC and BLK (USDHC)

Lukasz Majewski lukma at denx.de
Tue Sep 3 14:38:41 UTC 2019


After this commit the display5 device would use eMMC driver supporting
driver model (DM_MMC and BLK).

Signed-off-by: Lukasz Majewski <lukma at denx.de>
---

Changes in v2: None

 arch/arm/mach-imx/mx6/Kconfig      |  1 +
 board/liebherr/display5/common.c   |  6 ------
 board/liebherr/display5/common.h   |  1 -
 board/liebherr/display5/display5.c | 22 ----------------------
 4 files changed, 1 insertion(+), 29 deletions(-)

diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig
index 39f0e548f5f1..2496ecacb104 100644
--- a/arch/arm/mach-imx/mx6/Kconfig
+++ b/arch/arm/mach-imx/mx6/Kconfig
@@ -188,6 +188,7 @@ config TARGET_DISPLAY5
 	bool "LWN DISPLAY5 board"
 	select DM
 	select DM_I2C
+	select DM_MMC
 	select DM_GPIO
 	select DM_SERIAL
 	select SUPPORT_SPL
diff --git a/board/liebherr/display5/common.c b/board/liebherr/display5/common.c
index 8390d9a0f31c..754c442427f8 100644
--- a/board/liebherr/display5/common.c
+++ b/board/liebherr/display5/common.c
@@ -109,12 +109,6 @@ void displ5_set_iomux_usdhc_spl(void)
 	SETUP_IOMUX_PADS(usdhc4_pads);
 }
 
-void displ5_set_iomux_usdhc(void)
-{
-	SETUP_IOMUX_PADS(usdhc4_pads);
-}
-
 #else
 void displ5_set_iomux_usdhc_spl(void) {}
-void displ5_set_iomux_usdhc(void) {}
 #endif
diff --git a/board/liebherr/display5/common.h b/board/liebherr/display5/common.h
index 78c64b02e280..231cefc96009 100644
--- a/board/liebherr/display5/common.h
+++ b/board/liebherr/display5/common.h
@@ -36,7 +36,6 @@ void displ5_set_iomux_uart(void);
 void displ5_set_iomux_ecspi_spl(void);
 void displ5_set_iomux_ecspi(void);
 void displ5_set_iomux_usdhc_spl(void);
-void displ5_set_iomux_usdhc(void);
 void displ5_set_iomux_misc_spl(void);
 
 #endif /* __DISPL5_COMMON_H_ */
diff --git a/board/liebherr/display5/display5.c b/board/liebherr/display5/display5.c
index 5ebc8529e9c7..0cc77dac0fa1 100644
--- a/board/liebherr/display5/display5.c
+++ b/board/liebherr/display5/display5.c
@@ -20,8 +20,6 @@
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/mach-imx/spi.h>
-#include <mmc.h>
-#include <fsl_esdhc_imx.h>
 #include <miiphy.h>
 #include <netdev.h>
 #include <i2c.h>
@@ -142,26 +140,6 @@ iomux_v3_cfg_t const misc_pads[] = {
 	MX6_PAD_EIM_D29__GPIO3_IO29 | MUX_PAD_CTRL(NO_PAD_CTRL),
 };
 
-#ifdef CONFIG_FSL_ESDHC_IMX
-struct fsl_esdhc_cfg usdhc_cfg[1] = {
-	{ USDHC4_BASE_ADDR, 0, 8, },
-};
-
-int board_mmc_getcd(struct mmc *mmc)
-{
-	return 1;
-}
-
-int board_mmc_init(bd_t *bis)
-{
-	displ5_set_iomux_usdhc();
-
-	usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC4_CLK);
-
-	return fsl_esdhc_initialize(bis, &usdhc_cfg[0]);
-}
-#endif /* CONFIG_FSL_ESDHC_IMX */
-
 static void displ5_setup_ecspi(void)
 {
 	int ret;
-- 
2.11.0



More information about the U-Boot mailing list