sdhci: handle dma boundary interrupts
authorPierre Ossman <drzeus@drzeus.cx>
Sun, 13 May 2007 20:39:23 +0000 (22:39 +0200)
committerPierre Ossman <drzeus@drzeus.cx>
Mon, 14 May 2007 16:51:37 +0000 (18:51 +0200)
When the device hits certain memory boundaries, it signals an
interrupt and expects to be serviced. We don't need the feature
but we need to make sure the device doesn't stall.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
drivers/mmc/host/sdhci.c

index ff5bf73cdd25656bcc41df6b1dc9e7e03e4d42f0..a359efdd77ebda58632a169728e6ce7ba6103d6f 100644 (file)
@@ -963,6 +963,15 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask)
                if (intmask & (SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL))
                        sdhci_transfer_pio(host);
 
+               /*
+                * We currently don't do anything fancy with DMA
+                * boundaries, but as we can't disable the feature
+                * we need to at least restart the transfer.
+                */
+               if (intmask & SDHCI_INT_DMA_END)
+                       writel(readl(host->ioaddr + SDHCI_DMA_ADDRESS),
+                               host->ioaddr + SDHCI_DMA_ADDRESS);
+
                if (intmask & SDHCI_INT_DATA_END)
                        sdhci_finish_data(host);
        }