alistair23-linux/drivers/mmc
James Hogan b40af3aa77 mmc: dw_mmc: clear TXDR/RXDR ints before enabling
DMA is only used for transactions exceeding a certain length, otherwise
PIO is used. The TXDR and RXDR interrupts are masked when in DMA mode
but still fire. When switching to PIO mode (e.g. to get SCR field when
an SD card is inserted) these interrupts are not cleared and so they
trigger the ISR as soon as they are unmasked. If the previous DMA did a
write, then the ISR will handle the TXDR interrupt even if the
transaction is a read, completing the transaction without modifying the
read buffer.

This is fixed primarily by clearing these two interrupts before
unmasking them when setting up PIO mode, and also by making the ISR more
robust by only handling TXDR/RXDR in the correct read/write direction.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2011-07-20 17:20:57 -04:00
..
card mmc: block: add checking of r/w command response 2011-07-20 17:20:55 -04:00
core mmc: core: Bus width testing needs to handle suspend/resume 2011-07-13 14:54:37 -04:00
host mmc: dw_mmc: clear TXDR/RXDR ints before enabling 2011-07-20 17:20:57 -04:00
Kconfig mmc: explicitly mention SDIO support in Kconfig 2008-10-12 11:04:36 +02:00
Makefile mmc: Makefile: Fix EXTRA_CFLAGS assignment 2010-10-23 21:11:15 +08:00