summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/mtk-sd.c
diff options
context:
space:
mode:
authorChaotian Jing <chaotian.jing@mediatek.com>2017-10-16 09:46:39 +0800
committerUlf Hansson <ulf.hansson@linaro.org>2017-11-02 15:20:27 +0100
commit6b10c9abfbceaf94ef227d98317020c557996186 (patch)
treebda041dd39246dd47f4623384badc313e2c9c26a /drivers/mmc/host/mtk-sd.c
parentc8609b22529755be6f75d9b0aeb2577f4bfa83de (diff)
downloadlinux-6b10c9abfbceaf94ef227d98317020c557996186.tar.gz
linux-6b10c9abfbceaf94ef227d98317020c557996186.tar.bz2
linux-6b10c9abfbceaf94ef227d98317020c557996186.zip
mmc: mediatek: perfer to use rise edge latching for cmd line
data lines have applied to perfer to use rise edge, also need apply it to cmd line. Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Tested-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/mtk-sd.c')
-rw-r--r--drivers/mmc/host/mtk-sd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 3247a5aed7d8..6457a7d8880f 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -1550,7 +1550,8 @@ static int msdc_tune_response(struct mmc_host *mmc, u32 opcode)
}
final_rise_delay = get_best_delay(host, rise_delay);
/* if rising edge has enough margin, then do not scan falling edge */
- if (final_rise_delay.maxlen >= 12 && final_rise_delay.start < 4)
+ if (final_rise_delay.maxlen >= 12 ||
+ (final_rise_delay.start == 0 && final_rise_delay.maxlen >= 4))
goto skip_fall;
sdr_set_bits(host->base + MSDC_IOCON, MSDC_IOCON_RSPL);