MLK-16496-1 imx8qm/qxp: set usdhc clock to 400M
authorPeng Fan <peng.fan@nxp.com>
Wed, 20 Sep 2017 07:07:53 +0000 (15:07 +0800)
committerJason Liu <jason.hui.liu@nxp.com>
Thu, 2 Nov 2017 18:37:18 +0000 (02:37 +0800)
Set usdhc clock to 400M. When enabling HS400 ES, DDR EN is enabled,
if we still have input clock as 200M, the real output clock will be 100M.

So set clock to 400M to get real 200M output when enabling HS400/ES.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
arch/arm/cpu/armv8/imx8/clock.c

index 01f53b2..bd34f45 100644 (file)
@@ -254,7 +254,7 @@ void init_clk_usdhc(u32 index)
 
        sc_err_t err;
        sc_ipc_t ipc;
-       sc_pm_clock_rate_t actual = 200000000;
+       sc_pm_clock_rate_t actual = 400000000;
 
        ipc = gd->arch.ipc_channel_handle;
 
@@ -267,8 +267,8 @@ void init_clk_usdhc(u32 index)
                return;
        }
 
-       if (actual != 200000000)
-               debug("Actual rate for SDHC_%d is %d\n", index, actual);
+       if (actual != 400000000)
+               printf("Actual rate for SDHC_%d is %d\n", index, actual);
 
        err = sc_pm_clock_enable(ipc, usdhcs[index], SC_PM_CLK_PER, true, false);
        if (err != SC_ERR_NONE) {