lkml.org 
[lkml]   [2015]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v4 3/3] mmc: dw_mmc: Don't start command while data busy
Date
We should wait until unbusy before the next request.
But this does't need if the command is CMD13, which can access
SD Status register regardless of data busy.

Signed-off-by: Addy Ke <addy.ke@rock-chips.com>
---
Changes in v4:
- CMD13 doesn't need wait until unbusy.

drivers/mmc/host/dw_mmc.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index ac21863..692d97a 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1076,6 +1076,10 @@ static void dw_mci_request(struct mmc_host *mmc, struct mmc_request *mrq)

WARN_ON(slot->mrq);

+ /* Wait until unbusy if the command isn't CMD13 */
+ if (mrq->cmd->opcode != MMC_SEND_STATUS)
+ dw_mci_wait_busy(slot);
+
/*
* The check for card presence and queueing of the request must be
* atomic, otherwise the card could be removed in between and the
--
1.8.3.2



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