emmc: modify emmc shutdown time too long
authorNan Li <nan.li@amlogic.com>
Fri, 20 Apr 2018 05:53:51 +0000 (13:53 +0800)
committerYixun Lan <yixun.lan@amlogic.com>
Thu, 3 May 2018 08:59:55 +0000 (01:59 -0700)
PD#164859: modify emmc shutdown time too long.
Kingston EMMC08G-T227 POWER_OFF_LONG_TIME is 0xff,
shutdown time is too long.
modify mmc_delay 0 when POWER_OFF_LONG_TIME is 0xff.

Change-Id: Ie85be335a77d9ec82a12158996c2c773d113c41f
Signed-off-by: Nan Li <nan.li@amlogic.com>
drivers/mmc/core/mmc_ops.c

index ad6e979..179300d 100644 (file)
@@ -563,7 +563,10 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value,
                 * rely on waiting for the stated timeout to be sufficient.
                 */
                if (!send_status && !host->ops->card_busy) {
-                       mmc_delay(timeout_ms);
+#ifdef CONFIG_AMLOGIC_MMC
+                       if (timeout_ms < 5100)
+#endif
+                               mmc_delay(timeout_ms);
                        goto out;
                }