aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSubhash Jadavani <subhashj@codeaurora.org>2011-05-02 08:40:40 -0400
committerChris Ball <cjb@laptop.org>2011-10-26 15:43:37 -0400
commit190657c9f464b9f99a05a6ed8476c8bbccbc6a8b (patch)
tree124dbd666bbfbaa0768e1c54a2bf79f55e2fceb8
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>
-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 a835ac0269e0..61c7d385fd3a 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)
1242 /* 1242 /*
1243 * Setup DMA 1243 * Setup DMA
1244 */ 1244 */
1245 ret = msmsdcc_init_dma(host); 1245 if (host->dmares) {
1246 if (ret) 1246 ret = msmsdcc_init_dma(host);
1247 goto ioremap_free; 1247 if (ret)
1248 goto ioremap_free;
1249 } else {
1250 host->dma.channel = -1;
1251 }
1248 1252
1249 /* Get our clocks */ 1253 /* Get our clocks */
1250 host->pclk = clk_get(&pdev->dev, "sdc_pclk"); 1254 host->pclk = clk_get(&pdev->dev, "sdc_pclk");
@@ -1388,8 +1392,9 @@ msmsdcc_probe(struct platform_device *pdev)
1388 pclk_put: 1392 pclk_put:
1389 clk_put(host->pclk); 1393 clk_put(host->pclk);
1390dma_free: 1394dma_free:
1391 dma_free_coherent(NULL, sizeof(struct msmsdcc_nc_dmadata), 1395 if (host->dmares)
1392 host->dma.nc, host->dma.nc_busaddr); 1396 dma_free_coherent(NULL, sizeof(struct msmsdcc_nc_dmadata),
1397 host->dma.nc, host->dma.nc_busaddr);
1393ioremap_free: 1398ioremap_free:
1394 tasklet_kill(&host->dma_tlet); 1399 tasklet_kill(&host->dma_tlet);
1395 iounmap(host->base); 1400 iounmap(host->base);