lkml.org 
[lkml]   [2020]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/3] mmc: core: fix mmc_sdio_reinit_card fail issue
Date
From: yong mao <yong.mao@mediatek.com>

If SDIO device is initialized by UHS mode, it will run with 1.8v power.
In this mode, mmc_go_idle may not make SDIO device go idle successfully
in some special SDIO device. And then it can't be re-initialized
successfully.
According to the logic in sdio_reset_comm and mmc_sdio_sw_reset,
invoking mmc_set_clock(host, host->f_min) before mmc_send_io_op_cond
can make this SDIO device back to right state.

Signed-off-by: Yong Mao <yong.mao@mediatek.com>
---
drivers/mmc/core/sdio.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index f173cad..dc4dc63 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -850,6 +850,7 @@ static int mmc_sdio_reinit_card(struct mmc_host *host)

sdio_reset(host);
mmc_go_idle(host);
+ mmc_set_clock(host, host->f_min);
mmc_send_if_cond(host, host->card->ocr);

ret = mmc_send_io_op_cond(host, 0, NULL);
--
1.9.1
\
 
 \ /
  Last update: 2020-04-14 05:42    [W:0.295 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site