aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sdhci.h
diff options
context:
space:
mode:
authorMikko Vinni <mmvinni@yahoo.com>2011-04-12 09:36:18 -0400
committerChris Ball <cjb@laptop.org>2011-05-24 21:01:29 -0400
commitf6a03cbf43e586211f8ea088148c8ecd3fc4b5be (patch)
tree6b3c34b585d7412cf1c82d0eb33b389ea0fa8e0f /drivers/mmc/host/sdhci.h
parent6f60c22252af05df94352240f30f9fc84090d88d (diff)
mmc: sdhci: work around broken dma boundary behavior
Some SD host controllers (noticed on an integrated JMicron SD reader on an HP Pavilion dv5-1250eo laptop) don't update the dma address register before signaling a dma interrupt due to a dma boundary. Update the register manually to the next boundary (by default 512KiB), at which the transfer stopped. As long as each transfer is at most 512KiB in size (guaranteed by a BUG_ON in sdhci_prepare_data()) and the boundary is kept at the default value, this fix is needed at most once per transfer. Smaller boundaries are taken care of by counting the transferred bytes. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=28462 Signed-off-by: Mikko Vinni <mmvinni@yahoo.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/sdhci.h')
-rw-r--r--drivers/mmc/host/sdhci.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index 25e8bde600d1..85750a94c612 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -202,6 +202,12 @@
202#define SDHCI_MAX_DIV_SPEC_200 256 202#define SDHCI_MAX_DIV_SPEC_200 256
203#define SDHCI_MAX_DIV_SPEC_300 2046 203#define SDHCI_MAX_DIV_SPEC_300 2046
204 204
205/*
206 * Host SDMA buffer boundary. Valid values from 4K to 512K in powers of 2.
207 */
208#define SDHCI_DEFAULT_BOUNDARY_SIZE (512 * 1024)
209#define SDHCI_DEFAULT_BOUNDARY_ARG (ilog2(SDHCI_DEFAULT_BOUNDARY_SIZE) - 12)
210
205struct sdhci_ops { 211struct sdhci_ops {
206#ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS 212#ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS
207 u32 (*read_l)(struct sdhci_host *host, int reg); 213 u32 (*read_l)(struct sdhci_host *host, int reg);