From 8bbdb3514b5416b7592bbdf746f8def34309bf77 Mon Sep 17 00:00:00 2001 From: Sahitya Tummala Date: Wed, 20 Mar 2013 19:34:59 +0530 Subject: [PATCH] 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 --- drivers/mmc/host/sdhci-msm.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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 #include #include +#include #include #include @@ -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);