mac80211: ath11k: re-enable ipq807x coldboot calibration
[openwrt/openwrt.git] / target / linux / mediatek / patches-4.14 / 0160-mmc-mediatek-perfer-to-use-rise-edge-latching-for-cm.patch
1 From 81fdc4983e33ef01935a9bf01187951aad34e2ac Mon Sep 17 00:00:00 2001
2 From: Chaotian Jing <chaotian.jing@mediatek.com>
3 Date: Mon, 16 Oct 2017 09:46:39 +0800
4 Subject: [PATCH 160/224] mmc: mediatek: perfer to use rise edge latching for
5 cmd line
6
7 data lines have applied to perfer to use rise edge, also need
8 apply it to cmd line.
9
10 Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com>
11 Tested-by: Sean Wang <sean.wang@mediatek.com>
12 Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
13 ---
14 drivers/mmc/host/mtk-sd.c | 3 ++-
15 1 file changed, 2 insertions(+), 1 deletion(-)
16
17 --- a/drivers/mmc/host/mtk-sd.c
18 +++ b/drivers/mmc/host/mtk-sd.c
19 @@ -1550,7 +1550,8 @@ static int msdc_tune_response(struct mmc
20 }
21 final_rise_delay = get_best_delay(host, rise_delay);
22 /* if rising edge has enough margin, then do not scan falling edge */
23 - if (final_rise_delay.maxlen >= 12 && final_rise_delay.start < 4)
24 + if (final_rise_delay.maxlen >= 12 ||
25 + (final_rise_delay.start == 0 && final_rise_delay.maxlen >= 4))
26 goto skip_fall;
27
28 sdr_set_bits(host->base + MSDC_IOCON, MSDC_IOCON_RSPL);