Commit 190657c9 authored by Subhash Jadavani's avatar Subhash Jadavani Committed by Chris Ball

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: default avatarSubhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: default avatarSahitya Tummala <stummala@codeaurora.org>
Signed-off-by: default avatarDavid Brown <davidb@codeaurora.org>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 19207f05
...@@ -1242,9 +1242,13 @@ msmsdcc_probe(struct platform_device *pdev) ...@@ -1242,9 +1242,13 @@ msmsdcc_probe(struct platform_device *pdev)
/* /*
* Setup DMA * Setup DMA
*/ */
ret = msmsdcc_init_dma(host); if (host->dmares) {
if (ret) ret = msmsdcc_init_dma(host);
goto ioremap_free; if (ret)
goto ioremap_free;
} else {
host->dma.channel = -1;
}
/* Get our clocks */ /* Get our clocks */
host->pclk = clk_get(&pdev->dev, "sdc_pclk"); host->pclk = clk_get(&pdev->dev, "sdc_pclk");
...@@ -1388,8 +1392,9 @@ msmsdcc_probe(struct platform_device *pdev) ...@@ -1388,8 +1392,9 @@ msmsdcc_probe(struct platform_device *pdev)
pclk_put: pclk_put:
clk_put(host->pclk); clk_put(host->pclk);
dma_free: dma_free:
dma_free_coherent(NULL, sizeof(struct msmsdcc_nc_dmadata), if (host->dmares)
host->dma.nc, host->dma.nc_busaddr); dma_free_coherent(NULL, sizeof(struct msmsdcc_nc_dmadata),
host->dma.nc, host->dma.nc_busaddr);
ioremap_free: ioremap_free:
tasklet_kill(&host->dma_tlet); tasklet_kill(&host->dma_tlet);
iounmap(host->base); iounmap(host->base);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment