From: Vasily Khoruzhick Date: Sat, 10 Nov 2018 04:41:45 +0000 (-0800) Subject: sunxi-mmc: don't double clock for new mode unconditionally X-Git-Url: http://git.dujemihanovic.xyz/login.html?a=commitdiff_plain;h=629d267a9738f0214853493968f114962de54642;p=u-boot.git sunxi-mmc: don't double clock for new mode unconditionally Comment in Linux driver says that clock needs to be doubled only if we use DDR modes, moreover divider has to be set accordingly. U-boot driver doesn't declare support for any DDR modes and doesn't set internal clock divider in CLKCR, so it doubles clock unconditionally when new mode is used. Some cards can't handle that and as result SPL fails to load u-boot. Fixes: de9b1771c3b ("mmc: sunxi: Support new mode") Signed-off-by: Vasily Khoruzhick Reviewed-by: Jagan Teki Tested-by: Jagan Teki # Amarula A64-Relic --- diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c index b3526f5e3f..e50b2c3343 100644 --- a/drivers/mmc/sunxi_mmc.c +++ b/drivers/mmc/sunxi_mmc.c @@ -109,13 +109,6 @@ static int mmc_set_mod_clk(struct sunxi_mmc_priv *priv, unsigned int hz) calibrate = true; #endif - /* - * The MMC clock has an extra /2 post-divider when operating in the new - * mode. - */ - if (new_mode) - hz = hz * 2; - if (hz <= 24000000) { pll = CCM_MMC_CTRL_OSCM24; pll_hz = 24000000;