[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120920221630.GL28835@atomide.com>
Date: Thu, 20 Sep 2012 15:16:31 -0700
From: Tony Lindgren <tony@...mide.com>
To: Matt Porter <mporter@...com>
Cc: Sekhar Nori <nsekhar@...com>,
Grant Likely <grant.likely@...retlab.ca>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>,
Benoit Cousson <b-cousson@...com>,
Russell King <linux@....linux.org.uk>,
Vinod Koul <vinod.koul@...el.com>,
Rob Landley <rob@...dley.net>, Chris Ball <cjb@...top.org>,
Devicetree Discuss <devicetree-discuss@...ts.ozlabs.org>,
Linux OMAP List <linux-omap@...r.kernel.org>,
Linux ARM Kernel List <linux-arm-kernel@...ts.infradead.org>,
Linux DaVinci Kernel List
<davinci-linux-open-source@...ux.davincidsp.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Documentation List <linux-doc@...r.kernel.org>,
Linux MMC List <linux-mmc@...r.kernel.org>,
Linux SPI Devel List
<spi-devel-general@...ts.sourceforge.net>,
Arnd Bergmann <arnd@...db.de>, Dan Williams <djbw@...com>,
Rob Herring <rob.herring@...xeda.com>
Subject: Re: [RFC PATCH 07/13] mmc: omap_hsmmc: dma_request_slave_channel()
support for DT platforms
* Matt Porter <mporter@...com> [120920 07:43]:
> 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 <mporter@...com>
> ---
> 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;
>
Here to the omap_hsmmc.c driver should not need to care about which
way to request the dma channels.
Regards,
Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists