MLK-11789 mmc: sdhci: Add 1ms delay in eMMC tuning procedure
authorHaibo Chen <haibo.chen@freescale.com>
Thu, 29 Oct 2015 09:21:37 +0000 (17:21 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:49:08 +0000 (14:49 -0500)
On 4.1 kernel, some eMMC on i.MX7D-SDB board can't pass HS400 tuning,
the same eMMC can pass HS400 tuning on 3.14 kernel. The difference
is that 4.1 kernel does not have 1ms delay for eMMC during the
tuning procedure. The root cause still not find, add back the
1ms delay first.

Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
drivers/mmc/host/sdhci.c

index 61d561d..dc4f170 100644 (file)
@@ -2128,9 +2128,8 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
 
                ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2);
 
-               /* eMMC spec does not require a delay between tuning cycles */
-               if (opcode == MMC_SEND_TUNING_BLOCK)
-                       mdelay(1);
+               /* Add 1ms delay for SD and eMMC */
+               mdelay(1);
        } while (ctrl & SDHCI_CTRL_EXEC_TUNING);
 
        /*