linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: atmel-mci: convert to dma_request_slave_channel_compat()
       [not found] <517F7B6F.4070907@atmel.com>
@ 2013-05-10 10:05 ` Nicolas Ferre
  2013-05-26 17:34   ` Chris Ball
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Ferre @ 2013-05-10 10:05 UTC (permalink / raw)
  To: linux-mmc, Chris Ball
  Cc: linux-arm-kernel, linux-kernel, Ludovic Desroches,
	Jean-Christophe PLAGNIOL-VILLARD

From: Ludovic Desroches <ludovic.desroches@atmel.com>

Use generic DMA DT helper. Platforms booting with or without DT populated are
both supported.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
Hi Chris,

This patch is part of a series by Ludovic and is adding the generic slave
DMA request channel function, as we now have the support for DMA bindings.

This is the only patch of the series that should go through your tree. And it
seems that my little reminder didn't catch your attention in time for 3.10 merge
window but I still hope that we can make it for 3.10-final... It is also true
that we didn't put you in copy of the original message and that the subject
line was somehow malformed ;-)

Here is the Linux arm kernel patchwork reference of previous discussion:
https://patchwork.kernel.org/patch/2463641/

Thanks, best regards,

 drivers/mmc/host/atmel-mci.c | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index e75774f..aca59d9 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -2230,10 +2230,15 @@ static void __exit atmci_cleanup_slot(struct atmel_mci_slot *slot,
 	mmc_free_host(slot->mmc);
 }
 
-static bool atmci_filter(struct dma_chan *chan, void *slave)
+static bool atmci_filter(struct dma_chan *chan, void *pdata)
 {
-	struct mci_dma_data	*sl = slave;
+	struct mci_platform_data *sl_pdata = pdata;
+	struct mci_dma_data *sl;
 
+	if (!sl_pdata)
+		return false;
+
+	sl = sl_pdata->dma_slave;
 	if (sl && find_slave_dev(sl) == chan->device->dev) {
 		chan->private = slave_data_ptr(sl);
 		return true;
@@ -2245,24 +2250,18 @@ static bool atmci_filter(struct dma_chan *chan, void *slave)
 static bool atmci_configure_dma(struct atmel_mci *host)
 {
 	struct mci_platform_data	*pdata;
+	dma_cap_mask_t mask;
 
 	if (host == NULL)
 		return false;
 
 	pdata = host->pdev->dev.platform_data;
 
-	if (!pdata)
-		return false;
+	dma_cap_zero(mask);
+	dma_cap_set(DMA_SLAVE, mask);
 
-	if (pdata->dma_slave && find_slave_dev(pdata->dma_slave)) {
-		dma_cap_mask_t mask;
-
-		/* Try to grab a DMA channel */
-		dma_cap_zero(mask);
-		dma_cap_set(DMA_SLAVE, mask);
-		host->dma.chan =
-			dma_request_channel(mask, atmci_filter, pdata->dma_slave);
-	}
+	host->dma.chan = dma_request_slave_channel_compat(mask, atmci_filter, pdata,
+							  &host->pdev->dev, "rxtx");
 	if (!host->dma.chan) {
 		dev_warn(&host->pdev->dev, "no DMA channel available\n");
 		return false;
-- 
1.8.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mmc: atmel-mci: convert to dma_request_slave_channel_compat()
  2013-05-10 10:05 ` [PATCH] mmc: atmel-mci: convert to dma_request_slave_channel_compat() Nicolas Ferre
@ 2013-05-26 17:34   ` Chris Ball
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Ball @ 2013-05-26 17:34 UTC (permalink / raw)
  To: Nicolas Ferre
  Cc: linux-mmc, linux-arm-kernel, linux-kernel, Ludovic Desroches,
	Jean-Christophe PLAGNIOL-VILLARD

Hi Nicolas,

On Fri, May 10 2013, Nicolas Ferre wrote:
> From: Ludovic Desroches <ludovic.desroches@atmel.com>
>
> Use generic DMA DT helper. Platforms booting with or without DT populated are
> both supported.
>
> Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
> Hi Chris,
>
> This patch is part of a series by Ludovic and is adding the generic slave
> DMA request channel function, as we now have the support for DMA bindings.
>
> This is the only patch of the series that should go through your tree. And it
> seems that my little reminder didn't catch your attention in time for 3.10 merge
> window but I still hope that we can make it for 3.10-final... It is also true
> that we didn't put you in copy of the original message and that the subject
> line was somehow malformed ;-)
>
> Here is the Linux arm kernel patchwork reference of previous discussion:
> https://patchwork.kernel.org/patch/2463641/

Thanks, I'm sorry for the delay.  This is in mmc-next now, I'll send
it to Linus for the next -rc.

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-05-26 17:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <517F7B6F.4070907@atmel.com>
2013-05-10 10:05 ` [PATCH] mmc: atmel-mci: convert to dma_request_slave_channel_compat() Nicolas Ferre
2013-05-26 17:34   ` Chris Ball

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).