Patchwork [U-Boot,2/2] mmc: atmel_mci: add mmc card support

login
register
mail settings
Submitter Bo Shen
Date April 26, 2013, 10:27 a.m.
Message ID <1366972027-26840-2-git-send-email-voice.shen@atmel.com>
Download mbox | patch
Permalink /patch/239798/
State Accepted
Delegated to: Andreas BieƟmann
Headers show

Comments

Bo Shen - April 26, 2013, 10:27 a.m.
add mmc card support with atmel mci driver

Signed-off-by: Bo Shen <voice.shen@atmel.com>
---
 drivers/mmc/gen_atmel_mci.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Patch

diff --git a/drivers/mmc/gen_atmel_mci.c b/drivers/mmc/gen_atmel_mci.c
index fc0a181..77ebf17 100644
--- a/drivers/mmc/gen_atmel_mci.c
+++ b/drivers/mmc/gen_atmel_mci.c
@@ -211,7 +211,10 @@  mci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
 	/* Wait for the command to complete */
 	while (!((status = readl(&mci->sr)) & MMCI_BIT(CMDRDY)));
 
-	if (status & error_flags) {
+	if ((status & error_flags) & MMCI_BIT(RTOE)) {
+		dump_cmd(cmdr, cmd->cmdarg, status, "Command Time Out");
+		return TIMEOUT;
+	} else if (status & error_flags) {
 		dump_cmd(cmdr, cmd->cmdarg, status, "Command Failed");
 		return COMM_ERR;
 	}