Thread (52 messages) 52 messages, 9 authors, 2012-10-09
STALE4982d
Revisions (9)
  1. rfc current
  2. v2 [diff vs current]
  3. v3 [diff vs current]
  4. v4 [diff vs current]
  5. v5 [diff vs current]
  6. v6 [diff vs current]
  7. v7 [diff vs current]
  8. v8 [diff vs current]
  9. v9 [diff vs current]

[RFC PATCH 07/13] mmc: omap_hsmmc: dma_request_slave_channel() support for DT platforms

From: Matt Porter <hidden>
Date: 2012-09-20 14:42:36
Also in: linux-arm-kernel, linux-devicetree, linux-mmc, linux-omap, lkml
Subsystem: multimedia card (mmc), secure digital (sd) and sdio subsystem, omap hs mmc support, the rest · Maintainers: Ulf Hansson, Linus Torvalds

For platforms with DT populated, use dma_request_slave_channel()
to acquire the DMA channel. For !DT platforms, we fall back to
explicitly passing the omap_dma_filter_fn() to dma_request_channel().
Once all platforms boot from DT, the dma_request_channel() path can
be dropped.

Signed-off-by: Matt Porter <redacted>
---
 drivers/mmc/host/omap_hsmmc.c |   16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 3a09f93..c82d0ab 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1923,14 +1923,26 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev)
 	dma_cap_zero(mask);
 	dma_cap_set(DMA_SLAVE, mask);
 
-	host->rx_chan = dma_request_channel(mask, omap_dma_filter_fn, &rx_req);
+	if (pdev->dev.of_node)
+		host->rx_chan =
+			dma_request_slave_channel(&pdev->dev, "rx");
+	else
+		host->rx_chan = dma_request_channel(mask,
+						    omap_dma_filter_fn,
+						    &rx_req);
 	if (!host->rx_chan) {
 		dev_err(mmc_dev(host->mmc), "unable to obtain RX DMA engine channel %u\n", rx_req);
 		ret = -ENXIO;
 		goto err_irq;
 	}
 
-	host->tx_chan = dma_request_channel(mask, omap_dma_filter_fn, &tx_req);
+	if (pdev->dev.of_node)
+		host->tx_chan =
+			dma_request_slave_channel(&pdev->dev, "tx");
+	else
+		host->tx_chan = dma_request_channel(mask,
+						    omap_dma_filter_fn,
+						    &tx_req);
 	if (!host->tx_chan) {
 		dev_err(mmc_dev(host->mmc), "unable to obtain TX DMA engine channel %u\n", tx_req);
 		ret = -ENXIO;
-- 
1.7.9.5


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help