Skip to contentSkip to conversation

mmc: davinci: allow driver to work without DMA resource

PATCH In review Manjunathappa, Prakash 3 participants 4 messages Feb 5, 2013 – Mar 22, 2013 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mmc: davinci: allow driver to work without DMA resource

Do not return probe failure with missing DMA resources, allow driver to work in PIO mode.
Tested on da850-evm by mounting partition followed by file creation and deletion.

---
Since v1:
Specified missing DMA resource(RX/TX).

 drivers/mmc/host/davinci_mmc.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
drivers/mmc/host/davinci_mmc.c +6 -4
index 2063677..27123f8 100644
@@ -1190,13 +1190,15 @@ static int __init davinci_mmcsd_probe(struct platform_device *pdev)
 
 	r = platform_get_resource(pdev, IORESOURCE_DMA, 0);
 	if (!r)
-		goto out;
-	host->rxdma = r->start;
+		dev_warn(&pdev->dev, "RX DMA resource not specified\n");
+	else
+		host->rxdma = r->start;
 
 	r = platform_get_resource(pdev, IORESOURCE_DMA, 1);
 	if (!r)
-		goto out;
-	host->txdma = r->start;
+		dev_warn(&pdev->dev, "TX DMA resource not specified\n");
+	else
+		host->txdma = r->start;
 
 	host->mem_res = mem;
 	host->base = ioremap(mem->start, mem_size);
Signature · 1 line
1.7.4.1
#1 lore raw

Hi Chris,

As there are no comments, Could you please accept this patch?

Thanks,
Prakash

Quoted 41 lines · Prakash

Do not return probe failure with missing DMA resources, allow driver to work in PIO mode.
Tested on da850-evm by mounting partition followed by file creation and deletion.

---
Since v1:
Specified missing DMA resource(RX/TX).

 drivers/mmc/host/davinci_mmc.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
drivers/mmc/host/davinci_mmc.c +6 -4
index 2063677..27123f8 100644
@@ -1190,13 +1190,15 @@ static int __init davinci_mmcsd_probe(struct platform_device *pdev)
 
 	r = platform_get_resource(pdev, IORESOURCE_DMA, 0);
 	if (!r)
-		goto out;
-	host->rxdma = r->start;
+		dev_warn(&pdev->dev, "RX DMA resource not specified\n");
+	else
+		host->rxdma = r->start;
 
 	r = platform_get_resource(pdev, IORESOURCE_DMA, 1);
 	if (!r)
-		goto out;
-	host->txdma = r->start;
+		dev_warn(&pdev->dev, "TX DMA resource not specified\n");
+	else
+		host->txdma = r->start;
 
 	host->mem_res = mem;
 	host->base = ioremap(mem->start, mem_size);
Signature · 1 line
1.7.4.1
#3 lore raw

Hi,

Quoted 6 lines · Sekhar Nori
Quoted 5 lines · Prakash

Do not return probe failure with missing DMA resources, allow driver to work in PIO mode.
Tested on da850-evm by mounting partition followed by file creation and deletion.

Quoted 6 lines
Quoted 1 line

I verified this along with your other patches enabling use of MMC with DT boot.

Thanks, pushed to mmc-next for 3.10.

- Chris.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child