mx6sabresd: Remove U-Boot proper mmc initialization
authorFabio Estevam <festevam@gmail.com>
Tue, 21 May 2019 13:37:54 +0000 (10:37 -0300)
committerStefano Babic <sbabic@denx.de>
Tue, 11 Jun 2019 08:42:48 +0000 (10:42 +0200)
After the conversion to DM there is no need to have mmc initialization
code inside U-Boot proper.

Remove the unneeded code.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
board/freescale/mx6sabresd/mx6sabresd.c

index 385a18e..cdfc5ff 100644 (file)
@@ -287,49 +287,6 @@ int board_mmc_getcd(struct mmc *mmc)
 
 int board_mmc_init(bd_t *bis)
 {
-#ifndef CONFIG_SPL_BUILD
-       int ret;
-       int i;
-
-       /*
-        * According to the board_mmc_init() the following map is done:
-        * (U-Boot device node)    (Physical Port)
-        * mmc0                    SD2
-        * mmc1                    SD3
-        * mmc2                    eMMC
-        */
-       for (i = 0; i < CONFIG_SYS_FSL_USDHC_NUM; i++) {
-               switch (i) {
-               case 0:
-                       SETUP_IOMUX_PADS(usdhc2_pads);
-                       gpio_request(USDHC2_CD_GPIO, "USDHC2 CD");
-                       gpio_direction_input(USDHC2_CD_GPIO);
-                       usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
-                       break;
-               case 1:
-                       SETUP_IOMUX_PADS(usdhc3_pads);
-                       gpio_request(USDHC3_CD_GPIO, "USDHC3 CD");
-                       gpio_direction_input(USDHC3_CD_GPIO);
-                       usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
-                       break;
-               case 2:
-                       SETUP_IOMUX_PADS(usdhc4_pads);
-                       usdhc_cfg[2].sdhc_clk = mxc_get_clock(MXC_ESDHC4_CLK);
-                       break;
-               default:
-                       printf("Warning: you configured more USDHC controllers"
-                              "(%d) then supported by the board (%d)\n",
-                              i + 1, CONFIG_SYS_FSL_USDHC_NUM);
-                       return -EINVAL;
-               }
-
-               ret = fsl_esdhc_initialize(bis, &usdhc_cfg[i]);
-               if (ret)
-                       return ret;
-       }
-
-       return 0;
-#else
        struct src *psrc = (struct src *)SRC_BASE_ADDR;
        unsigned reg = readl(&psrc->sbmr1) >> 11;
        /*
@@ -363,7 +320,6 @@ int board_mmc_init(bd_t *bis)
        }
 
        return fsl_esdhc_initialize(bis, &usdhc_cfg[0]);
-#endif
 }
 #endif