linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matt Porter <mporter@ti.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Tony Lindgren <tony@atomide.com>, "Nori, Sekhar" <nsekhar@ti.com>,
	Grant Likely <grant.likely@secretlab.ca>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	"Cousson, Benoit" <b-cousson@ti.com>,
	Russell King <linux@arm.linux.org.uk>,
	Vinod Koul <vinod.koul@intel.com>, Rob Landley <rob@landley.net>,
	Chris Ball <cjb@laptop.org>,
	Devicetree Discuss <devicetree-discuss@lists.ozlabs.org>,
	Linux OMAP List <linux-omap@vger.kernel.org>,
	Linux ARM Kernel List <linux-arm-kernel@lists.infradead.org>,
	Linux DaVinci Kernel List 
	<davinci-linux-open-source@linux.davincidsp.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Documentation List <linux-doc@vger.kernel.org>,
	Linux MMC List <linux-mmc@vger.kernel.org>,
	Linux SPI Devel List  <spi-devel-general@lists.sourceforge.net>,
	Dan Williams <djbw@fb.com>, Rob Herring <rob.herring@calxeda.com>
Subject: Re: [PATCH v6 07/10] dmaengine: add dma_request_slave_channel_compat()
Date: Wed, 30 Jan 2013 20:38:23 -0500	[thread overview]
Message-ID: <20130131013823.GG2244@beef> (raw)
In-Reply-To: <ee89773ba46d44da945eee7b07ab1dc4@DFLE73.ent.ti.com>

On Wed, Jan 30, 2013 at 09:27:18AM +0000, Arnd Bergmann wrote:
> On Wednesday 30 January 2013, Matt Porter wrote:
> > Adds a dma_request_slave_channel_compat() wrapper which accepts
> > both the arguments from dma_request_channel() and
> > dma_request_slave_channel(). Based on whether the driver is
> > instantiated via DT, the appropriate channel request call will be
> > made.
> > 
> > This allows for a much cleaner migration of drivers to the
> > dmaengine DT API as platforms continue to be mixed between those
> > that boot using DT and those that do not.
> > 
> > Suggested-by: Tony Lindgren <tony@atomide.com>
> > Signed-off-by: Matt Porter <mporter@ti.com>
> > Acked-by: Tony Lindgren <tony@atomide.com>
> 
> Acked-by: Arnd Bergmann <arnd@arndb.de>
> 
> > @@ -1001,6 +1001,22 @@ void dma_run_dependencies(struct dma_async_tx_descriptor *tx);
> >  struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type);
> >  struct dma_chan *net_dma_find_channel(void);
> >  #define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y)
> > +#define dma_request_slave_channel_compat(mask, x, y, dev, name) \
> > +	__dma_request_slave_channel_compat(&(mask), x, y, dev, name)
> > +
> > +static inline struct dma_chan
> > +*__dma_request_slave_channel_compat(dma_cap_mask_t *mask, dma_filter_fn fn,
> > +				  void *fn_param, struct device *dev,
> > +				  char *name)
> > +{
> > +	struct dma_chan *chan;
> > +
> > +	chan = dma_request_slave_channel(dev, name);
> > +	if (chan)
> > +		return chan;
> > +
> > +	return __dma_request_channel(mask, fn, fn_param);
> > +}
> 
> After I have spent some more time with implementing the code for dw_dma,
> I think the mask is actually unnecessary here, the helper could just
> always set it to DMA_SLAVE before calling __dma_request_channel.
> 
> It's not a bug to do it this way though, and it may help convert drivers
> a little easier if there is less to change.

Agreed.

-Matt

> 
> 	Arnd

  parent reply	other threads:[~2013-01-31  1:37 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-30  7:00 [PATCH v6 00/10] DMA Engine support for AM33XX Matt Porter
2013-01-30  7:00 ` [PATCH v6 01/10] ARM: davinci: move private EDMA API to arm/common Matt Porter
2013-01-30  7:00 ` [PATCH v6 02/10] ARM: edma: remove unused transfer controller handlers Matt Porter
2013-01-30  7:00 ` [PATCH v6 03/10] ARM: edma: add AM33XX support to the private EDMA API Matt Porter
2013-01-30  9:32   ` Arnd Bergmann
2013-01-31 18:32     ` Matt Porter
2013-01-31 20:58       ` Arnd Bergmann
     [not found]       ` <6932828d68394f71ba6df8e6bf608635@DFLE72.ent.ti.com>
2013-01-31 21:42         ` Matt Porter
2013-02-01  6:01           ` Luciano Coelho
2013-02-01 11:57             ` Matt Porter
2013-01-30  7:00 ` [PATCH v6 04/10] dmaengine: edma: enable build for AM33XX Matt Porter
2013-01-30  7:00 ` [PATCH v6 05/10] dmaengine: edma: Add TI EDMA device tree binding Matt Porter
2013-01-30  7:00 ` [PATCH v6 06/10] ARM: dts: add AM33XX EDMA support Matt Porter
2013-01-30  7:00 ` [PATCH v6 07/10] dmaengine: add dma_request_slave_channel_compat() Matt Porter
2013-01-30  9:27   ` Arnd Bergmann
     [not found]   ` <ee89773ba46d44da945eee7b07ab1dc4@DFLE73.ent.ti.com>
2013-01-31  1:38     ` Matt Porter [this message]
2013-01-30  7:00 ` [PATCH v6 08/10] spi: omap2-mcspi: convert to dma_request_slave_channel_compat() Matt Porter
2013-01-30 10:35   ` Mark Brown
2013-01-30  7:00 ` [PATCH v6 09/10] spi: omap2-mcspi: add generic DMA request support to the DT binding Matt Porter
2013-01-30  9:24   ` Arnd Bergmann
2013-01-31  1:32     ` Matt Porter
2013-01-30  7:00 ` [PATCH v6 10/10] ARM: dts: add AM33XX SPI DMA support Matt Porter

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=20130131013823.GG2244@beef \
    --to=mporter@ti.com \
    --cc=arnd@arndb.de \
    --cc=b-cousson@ti.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=cjb@laptop.org \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=djbw@fb.com \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=nsekhar@ti.com \
    --cc=rob.herring@calxeda.com \
    --cc=rob@landley.net \
    --cc=spi-devel-general@lists.sourceforge.net \
    --cc=tony@atomide.com \
    --cc=vinod.koul@intel.com \
    /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).