0160-mmc-mediatek-perfer-to-use-rise-edge-latching-for-cm.patch 1.1 KB

12345678910111213141516171819202122232425262728
  1. From 81fdc4983e33ef01935a9bf01187951aad34e2ac Mon Sep 17 00:00:00 2001
  2. From: Chaotian Jing <[email protected]>
  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. data lines have applied to perfer to use rise edge, also need
  7. apply it to cmd line.
  8. Signed-off-by: Chaotian Jing <[email protected]>
  9. Tested-by: Sean Wang <[email protected]>
  10. Signed-off-by: Ulf Hansson <[email protected]>
  11. ---
  12. drivers/mmc/host/mtk-sd.c | 3 ++-
  13. 1 file changed, 2 insertions(+), 1 deletion(-)
  14. --- a/drivers/mmc/host/mtk-sd.c
  15. +++ b/drivers/mmc/host/mtk-sd.c
  16. @@ -1550,7 +1550,8 @@ static int msdc_tune_response(struct mmc
  17. }
  18. final_rise_delay = get_best_delay(host, rise_delay);
  19. /* if rising edge has enough margin, then do not scan falling edge */
  20. - if (final_rise_delay.maxlen >= 12 && final_rise_delay.start < 4)
  21. + if (final_rise_delay.maxlen >= 12 ||
  22. + (final_rise_delay.start == 0 && final_rise_delay.maxlen >= 4))
  23. goto skip_fall;
  24. sdr_set_bits(host->base + MSDC_IOCON, MSDC_IOCON_RSPL);