summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBo Shen <voice.shen@atmel.com>2013-04-26 00:27:07 +0000
committerBo Shen <voice.shen@atmel.com>2013-05-13 17:37:46 +0800
commitf7f5bfd1e7aea8101193d86a1766f46f4a592768 (patch)
treea384c9cb4ddad2138f0c44f904b01dbfaee98814
parentb9d7ce5d0c46d6a65dfdb9af58f4b8d9de8c7650 (diff)
mmc: atmel_mci: add mmc card support2012.10-at91-ts2
add mmc card support with atmel mci driver Signed-off-by: Bo Shen <voice.shen@atmel.com>
-rw-r--r--drivers/mmc/gen_atmel_mci.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mmc/gen_atmel_mci.c b/drivers/mmc/gen_atmel_mci.c
index 3926f85512c..d621c10f208 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;
}