Commit 39418952 authored by Jarkko Lavinen's avatar Jarkko Lavinen Committed by Tony Lindgren

[PATCH] ARM: OMAP: Fix end of card MMC error

The MMC spev v4.1 has table 23 on page 65 listing the valid response
bits from each command.  The table specifies CMD12 response not
containing bit 31 (address out of range) and only 23, 22, and 20
(command crc, illegal command and card error) error bits and some
status bits are defined.
parent 88e19cd1
......@@ -418,6 +418,20 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id, struct pt_regs *regs)
}
}
if ((status & OMAP_MMC_STAT_CARD_ERR)
&& host->cmd->opcode == MMC_STOP_TRANSMISSION) {
u32 response = OMAP_MMC_READ(host->base, RSP6)
| (OMAP_MMC_READ(host->base, RSP7) << 16);
/* STOP sometimes sets must-ignore bits */
if (!(response & (R1_CC_ERROR
| R1_ILLEGAL_COMMAND
| R1_COM_CRC_ERROR))) {
status &= ~OMAP_MMC_STAT_CARD_ERR;
end_command = 1;
}
}
if (status & OMAP_MMC_STAT_CARD_ERR) {
// Card status error
printk(KERN_DEBUG "MMC%d: Card status error (CMD%d)\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment