All of lore.kernel.org
 help / color / mirror / Atom feed
From: mpa@pengutronix.de (Markus Pargmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/2] dma: imx-dma: Add oftree support
Date: Fri, 1 Mar 2013 14:56:45 +0100	[thread overview]
Message-ID: <20130301135645.GA21700@pengutronix.de> (raw)
In-Reply-To: <20130228063026.GC26106@S2101-09.ap.freescale.net>

On Thu, Feb 28, 2013 at 02:30:27PM +0800, Shawn Guo wrote:
> On Mon, Feb 25, 2013 at 05:04:14PM +0100, Markus Pargmann wrote:
> > Adding devicetree support for imx-dma driver. Use driver name for
> > function 'imx_dma_is_general_purpose' because the devicename for
> > devicetree initialized devices is different.
> 
> ...
> 
> > @@ -63,7 +66,8 @@ static inline int imx_dma_is_general_purpose(struct dma_chan *chan)
> >  	return strstr(dev_name(chan->device->dev), "sdma") ||
> >  		!strcmp(dev_name(chan->device->dev), "imx1-dma") ||
> >  		!strcmp(dev_name(chan->device->dev), "imx21-dma") ||
> > -		!strcmp(dev_name(chan->device->dev), "imx27-dma");
> > +		!strcmp(dev_name(chan->device->dev), "imx27-dma") ||
> > +		!strcmp(chan->device->dev->driver->name, "imx-dma");
> >  }
> 
> So the function could just look like the following?
> 
> static inline int imx_dma_is_general_purpose(struct dma_chan *chan)
> {
>         return !strcmp(chan->device->dev->driver->name, "imx-sdma") ||
>                 !strcmp(chan->device->dev->driver->name, "imx-dma");
> }

Yes. For imx-dma there is only imx1, imx21 and imx27 that use imx-dma
driver. And the devicenames of imx-sdma are imx31-sdma and imx35-sdma,
so all devices using imx-sdma match. I will change it for v4. Thanks

Markus

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

WARNING: multiple messages have this Message-ID (diff)
From: Markus Pargmann <mpa-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org,
	kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
	djbw-b10kYP2dOMg@public.gmane.org,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH v3 1/2] dma: imx-dma: Add oftree support
Date: Fri, 1 Mar 2013 14:56:45 +0100	[thread overview]
Message-ID: <20130301135645.GA21700@pengutronix.de> (raw)
In-Reply-To: <20130228063026.GC26106-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>

On Thu, Feb 28, 2013 at 02:30:27PM +0800, Shawn Guo wrote:
> On Mon, Feb 25, 2013 at 05:04:14PM +0100, Markus Pargmann wrote:
> > Adding devicetree support for imx-dma driver. Use driver name for
> > function 'imx_dma_is_general_purpose' because the devicename for
> > devicetree initialized devices is different.
> 
> ...
> 
> > @@ -63,7 +66,8 @@ static inline int imx_dma_is_general_purpose(struct dma_chan *chan)
> >  	return strstr(dev_name(chan->device->dev), "sdma") ||
> >  		!strcmp(dev_name(chan->device->dev), "imx1-dma") ||
> >  		!strcmp(dev_name(chan->device->dev), "imx21-dma") ||
> > -		!strcmp(dev_name(chan->device->dev), "imx27-dma");
> > +		!strcmp(dev_name(chan->device->dev), "imx27-dma") ||
> > +		!strcmp(chan->device->dev->driver->name, "imx-dma");
> >  }
> 
> So the function could just look like the following?
> 
> static inline int imx_dma_is_general_purpose(struct dma_chan *chan)
> {
>         return !strcmp(chan->device->dev->driver->name, "imx-sdma") ||
>                 !strcmp(chan->device->dev->driver->name, "imx-dma");
> }

Yes. For imx-dma there is only imx1, imx21 and imx27 that use imx-dma
driver. And the devicenames of imx-sdma are imx31-sdma and imx35-sdma,
so all devices using imx-sdma match. I will change it for v4. Thanks

Markus

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2013-03-01 13:56 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-22 14:37 [PATCH] dma: imx-dma: Add oftree support Markus Pargmann
2013-02-22 14:37 ` Markus Pargmann
2013-02-22 14:46 ` Arnd Bergmann
2013-02-22 14:46   ` Arnd Bergmann
2013-02-23 16:57   ` Markus Pargmann
2013-02-23 16:57     ` Markus Pargmann
2013-02-23 16:59 ` [PATCH V2] " Markus Pargmann
2013-02-23 16:59   ` Markus Pargmann
2013-02-23 22:16   ` Arnd Bergmann
2013-02-23 22:16     ` Arnd Bergmann
2013-02-24 12:27     ` Markus Pargmann
2013-02-24 12:27       ` Markus Pargmann
2013-02-25 14:31       ` Arnd Bergmann
2013-02-25 14:31         ` Arnd Bergmann
2013-02-25 16:04 ` [PATCH v3 1/2] " Markus Pargmann
2013-02-25 16:04   ` Markus Pargmann
2013-02-25 16:04   ` [PATCH v3 2/2] DMA: imx-dma: imxdma->dev used uninitialized Markus Pargmann
2013-02-25 16:04     ` Markus Pargmann
2013-02-25 16:24   ` [PATCH v3 1/2] dma: imx-dma: Add oftree support Arnd Bergmann
2013-02-25 16:24     ` Arnd Bergmann
2013-02-25 16:53     ` Markus Pargmann
2013-02-25 16:53       ` Markus Pargmann
2013-02-28  6:30   ` Shawn Guo
2013-02-28  6:30     ` Shawn Guo
2013-03-01 13:56     ` Markus Pargmann [this message]
2013-03-01 13:56       ` Markus Pargmann

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=20130301135645.GA21700@pengutronix.de \
    --to=mpa@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.