aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/omap_hsmmc.c
diff options
context:
space:
mode:
authorSantosh Shilimkar <santosh.shilimkar@ti.com>2013-05-10 08:12:35 -0400
committerChris Ball <cjb@laptop.org>2013-05-26 14:23:11 -0400
commit4a29b5591faf25555fdf2b717594d50f70c15066 (patch)
tree2fdb1e312c63c7c6556c693138507a836d87f289 /drivers/mmc/host/omap_hsmmc.c
parentd272fbf0ca4a59339c768d76858f4add6ff36ace (diff)
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: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/omap_hsmmc.c')
-rw-r--r--drivers/mmc/host/omap_hsmmc.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index dc89aead35a5..eccedc7d06a4 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1911,21 +1911,23 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
1911 1911
1912 omap_hsmmc_conf_bus_power(host); 1912 omap_hsmmc_conf_bus_power(host);
1913 1913
1914 res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx"); 1914 if (!pdev->dev.of_node) {
1915 if (!res) { 1915 res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx");
1916 dev_err(mmc_dev(host->mmc), "cannot get DMA TX channel\n"); 1916 if (!res) {
1917 ret = -ENXIO; 1917 dev_err(mmc_dev(host->mmc), "cannot get DMA TX channel\n");
1918 goto err_irq; 1918 ret = -ENXIO;
1919 } 1919 goto err_irq;
1920 tx_req = res->start; 1920 }
1921 tx_req = res->start;
1921 1922
1922 res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx"); 1923 res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx");
1923 if (!res) { 1924 if (!res) {
1924 dev_err(mmc_dev(host->mmc), "cannot get DMA RX channel\n"); 1925 dev_err(mmc_dev(host->mmc), "cannot get DMA RX channel\n");
1925 ret = -ENXIO; 1926 ret = -ENXIO;
1926 goto err_irq; 1927 goto err_irq;
1928 }
1929 rx_req = res->start;
1927 } 1930 }
1928 rx_req = res->start;
1929 1931
1930 dma_cap_zero(mask); 1932 dma_cap_zero(mask);
1931 dma_cap_set(DMA_SLAVE, mask); 1933 dma_cap_set(DMA_SLAVE, mask);