aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/mmci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host/mmci.c')
-rw-r--r--drivers/mmc/host/mmci.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 9e9596a68f4c..049f8e3676ac 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -1205,12 +1205,13 @@ mmci_cmd_irq(struct mmci_host *host, struct mmc_command *cmd,
1205 unsigned int status) 1205 unsigned int status)
1206{ 1206{
1207 void __iomem *base = host->base; 1207 void __iomem *base = host->base;
1208 bool sbc; 1208 bool sbc, busy_resp;
1209 1209
1210 if (!cmd) 1210 if (!cmd)
1211 return; 1211 return;
1212 1212
1213 sbc = (cmd == host->mrq->sbc); 1213 sbc = (cmd == host->mrq->sbc);
1214 busy_resp = !!(cmd->flags & MMC_RSP_BUSY);
1214 1215
1215 /* 1216 /*
1216 * We need to be one of these interrupts to be considered worth 1217 * We need to be one of these interrupts to be considered worth
@@ -1224,8 +1225,7 @@ mmci_cmd_irq(struct mmci_host *host, struct mmc_command *cmd,
1224 /* 1225 /*
1225 * ST Micro variant: handle busy detection. 1226 * ST Micro variant: handle busy detection.
1226 */ 1227 */
1227 if (host->variant->busy_detect) { 1228 if (busy_resp && host->variant->busy_detect) {
1228 bool busy_resp = !!(cmd->flags & MMC_RSP_BUSY);
1229 1229
1230 /* We are busy with a command, return */ 1230 /* We are busy with a command, return */
1231 if (host->busy_status && 1231 if (host->busy_status &&
@@ -1238,7 +1238,7 @@ mmci_cmd_irq(struct mmci_host *host, struct mmc_command *cmd,
1238 * that the special busy status bit is still set before 1238 * that the special busy status bit is still set before
1239 * proceeding. 1239 * proceeding.
1240 */ 1240 */
1241 if (!host->busy_status && busy_resp && 1241 if (!host->busy_status &&
1242 !(status & (MCI_CMDCRCFAIL|MCI_CMDTIMEOUT)) && 1242 !(status & (MCI_CMDCRCFAIL|MCI_CMDTIMEOUT)) &&
1243 (readl(base + MMCISTATUS) & host->variant->busy_detect_flag)) { 1243 (readl(base + MMCISTATUS) & host->variant->busy_detect_flag)) {
1244 1244