]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mmc: sdhci: fix sdma bug for large file transfer
authorLei Wen <leiwen@marvell.com>
Sat, 8 Oct 2011 04:14:58 +0000 (04:14 +0000)
committerAndy Fleming <afleming@freescale.com>
Thu, 3 Nov 2011 07:15:00 +0000 (02:15 -0500)
SDHCI spec need to reset the sdma base address while the software
try to accorss the 512k bytes address boundary. When meet such
accross behavior, sdhci controller would generate a interrupt
automatically, and software need handle this.

Signed-off-by: Lei Wen <leiwen@marvell.com>
drivers/mmc/sdhci.c

index 77a9e708d07af7ac1cc793e62085d5ae286316f0..fce0ef091184b39e07adf8a0acc8c29ab6a2d3dc 100644 (file)
@@ -104,7 +104,7 @@ static int sdhci_transfer_data(struct sdhci_host *host, struct mmc_data *data,
 #ifdef CONFIG_MMC_SDMA
                if (stat & SDHCI_INT_DMA_END) {
                        sdhci_writel(host, SDHCI_INT_DMA_END, SDHCI_INT_STATUS);
-                       start_addr &= SDHCI_DEFAULT_BOUNDARY_SIZE - 1;
+                       start_addr &= ~(SDHCI_DEFAULT_BOUNDARY_SIZE - 1);
                        start_addr += SDHCI_DEFAULT_BOUNDARY_SIZE;
                        sdhci_writel(host, start_addr, SDHCI_DMA_ADDRESS);
                }