[U-Boot] [RFC] mmc: fsl_esdhc: Do not set high speed mode on MX25 and MX51

Fabio Estevam festevam at gmail.com
Thu Oct 19 12:42:53 UTC 2017


On Thu, Oct 19, 2017 at 9:57 AM, Fabio Estevam <festevam at gmail.com> wrote:

> On my tests I need to force it 25MHz operation to be able to use the SD card.

A "less ugly" workaround that affects only mx25pdk:

--- a/board/freescale/mx25pdk/mx25pdk.c
+++ b/board/freescale/mx25pdk/mx25pdk.c
@@ -180,7 +180,7 @@ int board_mmc_init(bd_t *bis)
         * to 50 MHz that can be obtained, which requires to use UPLL as the
         * clock source. This actually gives 48 MHz.
         */
-       imx_set_perclk(MXC_ESDHC1_CLK, true, 50000000);
+       imx_set_perclk(MXC_ESDHC1_CLK, true, 25000000);
        esdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC1_CLK);
        return fsl_esdhc_initialize(bis, &esdhc_cfg[0]);
 }

For mx51evk this also fixes the issue:

diff --git a/board/freescale/mx51evk/mx51evk.c
b/board/freescale/mx51evk/mx51evk.c
index 9e8a02e..72b09b5 100644
--- a/board/freescale/mx51evk/mx51evk.c
+++ b/board/freescale/mx51evk/mx51evk.c
@@ -323,7 +323,7 @@ int board_mmc_init(bd_t *bis)
        u32 index;
        int ret;

-       esdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);
+       esdhc_cfg[0].sdhc_clk = 25000000;
        esdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);

        for (index = 0; index < CONFIG_SYS_FSL_ESDHC_NUM;


More information about the U-Boot mailing list