summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSubhash Jadavani <subhashj@codeaurora.org>2011-05-02 18:10:40 +0530
committerChris Ball <cjb@laptop.org>2011-10-26 15:43:37 -0400
commit190657c9f464b9f99a05a6ed8476c8bbccbc6a8b (patch)
tree124dbd666bbfbaa0768e1c54a2bf79f55e2fceb8 /drivers
parent19207f056d6dd390f96749e643a222d48517f7b1 (diff)
mmc: msm_sdcc: Handle dma resource not present case
If DMA resource is not available then SDCC driver should atleast work in PIO data transfer mode. Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by: Sahitya Tummala <stummala@codeaurora.org> Signed-off-by: David Brown <davidb@codeaurora.org> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/host/msm_sdcc.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c
index a835ac0269e..61c7d385fd3 100644
--- a/drivers/mmc/host/msm_sdcc.c
+++ b/drivers/mmc/host/msm_sdcc.c
@@ -1242,9 +1242,13 @@ msmsdcc_probe(struct platform_device *pdev)
/*
* Setup DMA
*/
- ret = msmsdcc_init_dma(host);
- if (ret)
- goto ioremap_free;
+ if (host->dmares) {
+ ret = msmsdcc_init_dma(host);
+ if (ret)
+ goto ioremap_free;
+ } else {
+ host->dma.channel = -1;
+ }
/* Get our clocks */
host->pclk = clk_get(&pdev->dev, "sdc_pclk");
@@ -1388,8 +1392,9 @@ msmsdcc_probe(struct platform_device *pdev)
pclk_put:
clk_put(host->pclk);
dma_free:
- dma_free_coherent(NULL, sizeof(struct msmsdcc_nc_dmadata),
- host->dma.nc, host->dma.nc_busaddr);
+ if (host->dmares)
+ dma_free_coherent(NULL, sizeof(struct msmsdcc_nc_dmadata),
+ host->dma.nc, host->dma.nc_busaddr);
ioremap_free:
tasklet_kill(&host->dma_tlet);
iounmap(host->base);