]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00175080 [MX6] MMC: kernel failed to init eMMC card, after boot from eMMC
authorRyan QIAN <b32804@freescale.com>
Wed, 22 Feb 2012 01:32:51 +0000 (09:32 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:11:02 +0000 (14:11 +0200)
issue:
if uboot is loaded from eMMC, the eMMC memory will be configured to DDR mode.
on kernel startup, it will initialize the card at SDR mode, while the register
of USDHC is still configured to DDR enable mode. Therefore, the initialization
of eMMC memory will fail.

fix:
- clear MIX_CTRL on sdhc platform init code.
- clear vselect bit of VENDOR_SPEC on sdhc platform init code.

Signed-off-by: Ryan QIAN <b32804@freescale.com>
drivers/mmc/host/sdhci-esdhc-imx.c

index 90c4b20f4f581719cfe409960dc916accd933de9..89c57359b8a562a1d6286558ccf8a99a96c0ade6 100644 (file)
@@ -630,7 +630,10 @@ static int esdhc_pltfm_init(struct sdhci_host *host, struct sdhci_pltfm_data *pd
                host->clk_mgr_en = true;
        }
 
-       reg = readl(host->ioaddr + SDHCI_MIX_CTRL);
+       writel(0, host->ioaddr + SDHCI_MIX_CTRL);
+       reg = readl(host->ioaddr + SDHCI_VENDOR_SPEC);
+       reg &= ~SDHCI_VENDOR_SPEC_VSELECT;
+       writel(reg, host->ioaddr + SDHCI_VENDOR_SPEC);
        /* disable card interrupt enable bit, and clear status bit
         * the default value of this enable bit is 1, but it should
         * be 0 regarding to standard host controller spec 2.1.3.