summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorSahitya Tummala <stummala@codeaurora.org>2013-03-20 19:34:59 +0530
committerSubhash Jadavani <subhashj@codeaurora.org>2016-05-27 10:28:30 -0700
commit8bbdb3514b5416b7592bbdf746f8def34309bf77 (patch)
tree66ac14383856882e84664bb8413a6baa61280911 /drivers/mmc
parentcff2042613214c2406de6ff81a6d937991e6f4fc (diff)
mmc: sdhci-msm: update dma_mask for SDHC device
Set the dma_mask to 0xffffffff to indicate full 32-bit address space and thus avoiding unnecessary buffers bouncing from high to low memory. Change-Id: Idaffe14d4e54a27b15e5a5d82dad41d843714d57 Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/sdhci-msm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
index feddbaf8f370..2709904fbcde 100644
--- a/drivers/mmc/host/sdhci-msm.c
+++ b/drivers/mmc/host/sdhci-msm.c
@@ -33,6 +33,7 @@
#include <linux/slab.h>
#include <linux/mmc/mmc.h>
#include <linux/mmc/slot-gpio.h>
+#include <linux/dma-mapping.h>
#include <mach/gpio.h>
#include <mach/msm_bus.h>
@@ -2035,6 +2036,13 @@ static int sdhci_msm_probe(struct platform_device *pdev)
}
}
+ if (dma_supported(mmc_dev(host->mmc), DMA_BIT_MASK(32))) {
+ host->dma_mask = DMA_BIT_MASK(32);
+ mmc_dev(host->mmc)->dma_mask = &host->dma_mask;
+ } else {
+ dev_err(&pdev->dev, "%s: Failed to set dma mask\n", __func__);
+ }
+
ret = sdhci_add_host(host);
if (ret) {
dev_err(&pdev->dev, "Add host failed (%d)\n", ret);