lkml.org 
[lkml]   [2015]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 2/2] mmc: dw_mmc: Don't start command while data busy
Date
We should wait for data busy here in non-volt-switch state.
This may happend when sdio sends CMD53.

Signed-off-by: Addy Ke <addy.ke@rock-chips.com>
---
drivers/mmc/host/dw_mmc.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index b0b57e3..b40080d 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1007,6 +1007,13 @@ static void __dw_mci_start_request(struct dw_mci *host,
mci_writel(host, BLKSIZ, data->blksz);
}

+ /*
+ * We should wait for data busy here in non-volt-switch state.
+ * This may happend when sdio sends CMD53.
+ */
+ if (host->state != STATE_WAITING_CMD11_DONE)
+ dw_mci_wait_busy(slot);
+
cmdflags = dw_mci_prepare_command(slot->mmc, cmd);

/* this is the first command, send the initialization clock */
--
1.8.3.2



\
 
 \ /
  Last update: 2015-02-09 08:41    [W:0.569 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site