Commit 4a29b559 authored by Santosh Shilimkar's avatar Santosh Shilimkar Committed by Chris Ball

mmc: omap_hsmmc: Skip platform_get_resource_byname() for dt case

MMC driver probe will abort for DT case because of failed
platform_get_resource_byname() lookup. Fix it by skipping resource
lookup byname for device tree build.

Issue is hidden because hwmod populates the IO resources which
helps to succeed platform_get_resource_byname() and probe.
Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: default avatarBalaji T K <balajitk@ti.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent d272fbf0
...@@ -1911,21 +1911,23 @@ static int omap_hsmmc_probe(struct platform_device *pdev) ...@@ -1911,21 +1911,23 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
omap_hsmmc_conf_bus_power(host); omap_hsmmc_conf_bus_power(host);
res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx"); if (!pdev->dev.of_node) {
if (!res) { res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx");
dev_err(mmc_dev(host->mmc), "cannot get DMA TX channel\n"); if (!res) {
ret = -ENXIO; dev_err(mmc_dev(host->mmc), "cannot get DMA TX channel\n");
goto err_irq; ret = -ENXIO;
} goto err_irq;
tx_req = res->start; }
tx_req = res->start;
res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx"); res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx");
if (!res) { if (!res) {
dev_err(mmc_dev(host->mmc), "cannot get DMA RX channel\n"); dev_err(mmc_dev(host->mmc), "cannot get DMA RX channel\n");
ret = -ENXIO; ret = -ENXIO;
goto err_irq; goto err_irq;
}
rx_req = res->start;
} }
rx_req = res->start;
dma_cap_zero(mask); dma_cap_zero(mask);
dma_cap_set(DMA_SLAVE, mask); dma_cap_set(DMA_SLAVE, mask);
......
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