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

Otavio Salvador otavio.salvador at ossystems.com.br
Thu Oct 19 12:46:15 UTC 2017


On Thu, Oct 19, 2017 at 10:42 AM, Fabio Estevam <festevam at gmail.com> wrote:
> 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;

I think the original RFC is better as workaround as it solves the
issue for other boards. This does not mean we shouldn't fix the root
cause ...

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


More information about the U-Boot mailing list