提交 190657c9 编写于 作者: S Subhash Jadavani 提交者: 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: NSubhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: NSahitya Tummala <stummala@codeaurora.org>
Signed-off-by: NDavid Brown <davidb@codeaurora.org>
Signed-off-by: NChris Ball <cjb@laptop.org>
上级 19207f05
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册