Skip to content

Commit

Permalink
mmc: msm_sdcc: Handle dma resource not present case
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Subhash Jadavani authored and Chris Ball committed Oct 26, 2011
1 parent 19207f0 commit 190657c
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions drivers/mmc/host/msm_sdcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 190657c

Please sign in to comment.