linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
To: Chris Ball <cjb-2X9k7bc8m7Mdnm+yROfE0A@public.gmane.org>
Cc: ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	plagnioj-sclMFOaUSTBWk0Htik3J/w@public.gmane.org
Subject: Re: [PATCH v3 5/6] mci: at91: convert to dma_request_slave_channel_compat()
Date: Tue, 30 Apr 2013 10:06:07 +0200	[thread overview]
Message-ID: <517F7B6F.4070907@atmel.com> (raw)
In-Reply-To: <1366362683-14496-6-git-send-email-ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>

On 04/19/2013 11:11 AM, ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org :
> From: Ludovic Desroches <ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
> 
> Use generic DMA DT helper. Platforms booting with or without DT populated are
> both supported.
> 
> Signed-off-by: Ludovic Desroches <ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj-sclMFOaUSTBWk0Htik3J/w@public.gmane.org>
> Acked-by: Nicolas Ferre <nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>

Hi Chris,

As you were not in copy of the patch, I send you a little reminder for
it. It 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.

Here is the only patch of the series that should go through your tree.
Other maintainers and ourselves have taken the other patches (no strong
synchronization needed between them).

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

But for sure, Ludovic or myself can send it again to you if you need.

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 10f8b73..ffbd0d3 100644
> --- a/drivers/mmc/host/atmel-mci.c
> +++ b/drivers/mmc/host/atmel-mci.c
> @@ -2224,10 +2224,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;
> @@ -2239,24 +2244,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;
> 


-- 
Nicolas Ferre

  parent reply	other threads:[~2013-04-30  8:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-19  9:11 [PATCH v3 0/6] ARM: at91: move to generic DMA device tree binding ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w
     [not found] ` <1366362683-14496-1-git-send-email-ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2013-04-19  9:11   ` [PATCH v3 1/6] at_hdmac: move to generic DMA binding ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w
     [not found]     ` <1366362683-14496-2-git-send-email-ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2013-04-22 10:22       ` Nicolas Ferre
     [not found]         ` <51750F68.4040701-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2013-04-23  3:44           ` Vinod Koul
2013-04-29 13:28             ` Nicolas Ferre
2013-04-30  8:48         ` Vinod Koul
2013-04-19  9:11   ` [PATCH v3 2/6] ARM: at91: dts: set #dma-cells to the correct value ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w
2013-04-19  9:39     ` Nicolas Ferre
2013-04-19  9:11   ` [PATCH v3 3/6] i2c: at91: convert to dma_request_slave_channel_compat() ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w
2013-04-19  9:11   ` [PATCH v3 4/6] ARM: at91: dts: add i2c dma support ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w
     [not found]     ` <1366362683-14496-5-git-send-email-ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2013-04-19  9:43       ` Nicolas Ferre
2013-04-19  9:11   ` [PATCH v3 5/6] mci: at91: convert to dma_request_slave_channel_compat() ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w
     [not found]     ` <1366362683-14496-6-git-send-email-ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2013-04-30  8:06       ` Nicolas Ferre [this message]
2013-04-19  9:11   ` [PATCH v3 6/6] ARM: at91: dts: add MCI DMA support ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w
2013-04-19  9:43     ` Nicolas Ferre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=517F7B6F.4070907@atmel.com \
    --to=nicolas.ferre-aife0yeh4naavxtiumwx3w@public.gmane.org \
    --cc=cjb-2X9k7bc8m7Mdnm+yROfE0A@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org \
    --cc=plagnioj-sclMFOaUSTBWk0Htik3J/w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).