Skip to content

Commit

Permalink
mmc: omap_hsmmc: Skip platform_get_resource_byname() for dt case
Browse files Browse the repository at this point in the history
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: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
  • Loading branch information
Santosh Shilimkar authored and Chris Ball committed May 26, 2013
1 parent d272fbf commit 4a29b55
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions drivers/mmc/host/omap_hsmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1911,21 +1911,23 @@ static int omap_hsmmc_probe(struct platform_device *pdev)

omap_hsmmc_conf_bus_power(host);

res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx");
if (!res) {
dev_err(mmc_dev(host->mmc), "cannot get DMA TX channel\n");
ret = -ENXIO;
goto err_irq;
}
tx_req = res->start;
if (!pdev->dev.of_node) {
res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx");
if (!res) {
dev_err(mmc_dev(host->mmc), "cannot get DMA TX channel\n");
ret = -ENXIO;
goto err_irq;
}
tx_req = res->start;

res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx");
if (!res) {
dev_err(mmc_dev(host->mmc), "cannot get DMA RX channel\n");
ret = -ENXIO;
goto err_irq;
res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx");
if (!res) {
dev_err(mmc_dev(host->mmc), "cannot get DMA RX channel\n");
ret = -ENXIO;
goto err_irq;
}
rx_req = res->start;
}
rx_req = res->start;

dma_cap_zero(mask);
dma_cap_set(DMA_SLAVE, mask);
Expand Down

0 comments on commit 4a29b55

Please sign in to comment.