public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: swarren@wwwdotorg•org (Stephen Warren)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH V2] dma: tegra: register as an OF DMA controller
Date: Tue, 03 Dec 2013 10:52:09 -0700	[thread overview]
Message-ID: <529E1A49.6050808@wwwdotorg.org> (raw)
In-Reply-To: <201311292208.26215.arnd@arndb.de>

On 11/29/2013 02:08 PM, Arnd Bergmann wrote:
> On Monday 25 November 2013, Stephen Warren wrote:
>> Well, you suggested not using of_dma_simple_xlate() since it wasn't
>> appropriate. I then started to implement an open-coded xlate function,
>> but found that it was 99% identical to the same thing in the mmp driver,
>> and hence created a common of_dma_slave_xlate() so as not to just
>> cut/paste it everywhere. Unfortunately, I only sent that patch to
>> dmaengine at vger.kernel.org and the DMA maintainers, and there's no
>> archive of that list:-(
> 
> Ok, I see. However, I think the need for nontrivial code to be duplicated
> across drivers is not a sign that we are missing a generic xlate function
> and another indirection level, but rather that we got the interface
> for dma_get_slave_channel() wrong (yes, that would be my fault).
> 
> Can you try coming up with a different method to achieve the same
> where you use a different helper from the driver specific xlate
> function that does not require a callback?
> 
> I think dma_get_slave_channel is great if you have one channel per
> request line and you can directly look up the channel from the
> DT data, but it is not good if you have pick a channel and work
> around the race.

Hmm. Can you take a look at "[PATCH V4] dma: add
dma_get_any_slave_channel(), for use in of_xlate()" at the link below.
It still implements this via xlate, but I don't see any benefit in
making drivers use a different API to request slave channels based on
how the DMA controller works.

http://lkml.org/lkml/2013/11/26/408

  reply	other threads:[~2013-12-03 17:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-25 21:53 [PATCH V2] dma: tegra: register as an OF DMA controller Stephen Warren
2013-11-25 22:09 ` Arnd Bergmann
2013-11-25 22:30   ` Stephen Warren
2013-11-25 23:09     ` Dan Williams
2013-11-25 23:14       ` Stephen Warren
2013-11-26  1:13         ` Dan Williams
2013-11-29 21:08     ` Arnd Bergmann
2013-12-03 17:52       ` Stephen Warren [this message]
2013-12-04  1:22         ` Arnd Bergmann
2013-12-04 17:09           ` Stephen Warren
2013-12-04 17:18             ` Lars-Peter Clausen
2013-12-06 21:16           ` Dan Williams
2013-12-06 22:19             ` Arnd Bergmann
2013-11-29 14:17 ` Thierry Reding
2013-12-03 17:59   ` Stephen Warren
2013-12-04  8:29     ` Thierry Reding

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=529E1A49.6050808@wwwdotorg.org \
    --to=swarren@wwwdotorg$(echo .)org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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