aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/tifm_sd.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/mmc/tifm_sd.c b/drivers/mmc/tifm_sd.c
index e65f8a0a9349..0581d09c58fc 100644
--- a/drivers/mmc/tifm_sd.c
+++ b/drivers/mmc/tifm_sd.c
@@ -36,8 +36,8 @@ module_param(fixed_timeout, bool, 0644);
36#define TIFM_MMCSD_INAB 0x0080 /* abort / initialize command */ 36#define TIFM_MMCSD_INAB 0x0080 /* abort / initialize command */
37#define TIFM_MMCSD_READ 0x8000 37#define TIFM_MMCSD_READ 0x8000
38 38
39#define TIFM_MMCSD_DATAMASK 0x001d /* set bits: EOFB, BRS, CB, EOC */ 39#define TIFM_MMCSD_DATAMASK 0x401d /* set bits: CERR, EOFB, BRS, CB, EOC */
40#define TIFM_MMCSD_ERRMASK 0x41e0 /* set bits: CERR, CCRC, CTO, DCRC, DTO */ 40#define TIFM_MMCSD_ERRMASK 0x01e0 /* set bits: CCRC, CTO, DCRC, DTO */
41#define TIFM_MMCSD_EOC 0x0001 /* end of command phase */ 41#define TIFM_MMCSD_EOC 0x0001 /* end of command phase */
42#define TIFM_MMCSD_CB 0x0004 /* card enter busy state */ 42#define TIFM_MMCSD_CB 0x0004 /* card enter busy state */
43#define TIFM_MMCSD_BRS 0x0008 /* block received/sent */ 43#define TIFM_MMCSD_BRS 0x0008 /* block received/sent */
@@ -242,7 +242,7 @@ change_state:
242 case IDLE: 242 case IDLE:
243 return; 243 return;
244 case CMD: 244 case CMD:
245 if (host_status & TIFM_MMCSD_EOC) { 245 if (host_status & (TIFM_MMCSD_EOC | TIFM_MMCSD_CERR)) {
246 tifm_sd_fetch_resp(cmd, sock); 246 tifm_sd_fetch_resp(cmd, sock);
247 if (cmd->data) { 247 if (cmd->data) {
248 host->state = BRS; 248 host->state = BRS;
@@ -341,10 +341,7 @@ static void tifm_sd_signal_irq(struct tifm_dev *sock,
341 goto done; 341 goto done;
342 342
343 if (host_status & TIFM_MMCSD_ERRMASK) { 343 if (host_status & TIFM_MMCSD_ERRMASK) {
344 if (host_status & TIFM_MMCSD_CERR) 344 if (host_status & (TIFM_MMCSD_CTO | TIFM_MMCSD_DTO))
345 error_code = MMC_ERR_FAILED;
346 else if (host_status
347 & (TIFM_MMCSD_CTO | TIFM_MMCSD_DTO))
348 error_code = MMC_ERR_TIMEOUT; 345 error_code = MMC_ERR_TIMEOUT;
349 else if (host_status 346 else if (host_status
350 & (TIFM_MMCSD_CCRC | TIFM_MMCSD_DCRC)) 347 & (TIFM_MMCSD_CCRC | TIFM_MMCSD_DCRC))