[PATCH v2 4/4] mx6cuboxi: remove unused code
Walter Lozano
walter.lozano at collabora.com
Wed Mar 11 15:30:17 CET 2020
After enabling SPL_OF_CONTROL, SPL_DM and SPL_DM_MMC the MMC
initialization code is not longer needed.
This patch removes the unused code.
Signed-off-by: Walter Lozano <walter.lozano at collabora.com>
---
board/solidrun/mx6cuboxi/mx6cuboxi.c | 65 ----------------------------
1 file changed, 65 deletions(-)
diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c b/board/solidrun/mx6cuboxi/mx6cuboxi.c
index 9bf3645f72..6e8d4e5666 100644
--- a/board/solidrun/mx6cuboxi/mx6cuboxi.c
+++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c
@@ -162,76 +162,11 @@ static void setup_iomux_uart(void)
SETUP_IOMUX_PADS(uart1_pads);
}
-static struct fsl_esdhc_cfg usdhc_cfg = {
- .esdhc_base = USDHC2_BASE_ADDR,
- .max_bus_width = 4,
-};
-
-static struct fsl_esdhc_cfg emmc_cfg = {
- .esdhc_base = USDHC3_BASE_ADDR,
- .max_bus_width = 8,
-};
-
int board_mmc_get_env_dev(int devno)
{
return devno;
}
-#define USDHC2_CD_GPIO IMX_GPIO_NR(1, 4)
-
-int board_mmc_getcd(struct mmc *mmc)
-{
- struct fsl_esdhc_cfg *cfg = mmc->priv;
- int ret = 0;
-
- switch (cfg->esdhc_base) {
- case USDHC2_BASE_ADDR:
- ret = !gpio_get_value(USDHC2_CD_GPIO);
- break;
- case USDHC3_BASE_ADDR:
- ret = (mmc_get_op_cond(mmc) < 0) ? 0 : 1; /* eMMC/uSDHC3 has no CD GPIO */
- break;
- }
-
- return ret;
-}
-
-static int mmc_init_spl(bd_t *bis)
-{
- struct src *psrc = (struct src *)SRC_BASE_ADDR;
- unsigned reg = readl(&psrc->sbmr1) >> 11;
-
- /*
- * Upon reading BOOT_CFG register the following map is done:
- * Bit 11 and 12 of BOOT_CFG register can determine the current
- * mmc port
- * 0x1 SD2
- * 0x2 SD3
- */
- switch (reg & 0x3) {
- case 0x1:
- SETUP_IOMUX_PADS(usdhc2_pads);
- usdhc_cfg.sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
- gd->arch.sdhc_clk = usdhc_cfg.sdhc_clk;
- return fsl_esdhc_initialize(bis, &usdhc_cfg);
- case 0x2:
- SETUP_IOMUX_PADS(usdhc3_pads);
- emmc_cfg.sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
- gd->arch.sdhc_clk = emmc_cfg.sdhc_clk;
- return fsl_esdhc_initialize(bis, &emmc_cfg);
- }
-
- return -ENODEV;
-}
-
-int board_mmc_init(bd_t *bis)
-{
- if (IS_ENABLED(CONFIG_SPL_BUILD))
- return mmc_init_spl(bis);
-
- return 0;
-}
-
static iomux_v3_cfg_t const enet_pads[] = {
IOMUX_PADS(PAD_ENET_MDIO__ENET_MDIO | MUX_PAD_CTRL(ENET_PAD_CTRL)),
IOMUX_PADS(PAD_ENET_MDC__ENET_MDC | MUX_PAD_CTRL(ENET_PAD_CTRL)),
--
2.20.1
More information about the U-Boot
mailing list