[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJe_Zhc4uJB8N9i2w38zzP3+XxcYF2v-zwsrhERWSi-yObV-6A@mail.gmail.com>
Date: Fri, 22 Jul 2011 23:13:05 +0530
From: Jaswinder Singh <jaswinder.singh@...aro.org>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: linux-kernel@...r.kernel.org, vinod.koul@...el.com,
dan.j.williams@...el.com, rmk+kernel@....linux.org.uk,
linus.walleij@...ricsson.com, per.friden@...ricsson.com,
wei.zhang@...escale.com, ebony.zhu@...escale.com,
iws@...o.caltech.edu, s.hauer@...gutronix.de,
maciej.sosnowski@...el.com, saeed@...vell.com,
shawn.guo@...escale.com, yur@...raft.com, agust@...x.de,
iwamatsu.nobuhiro@...esas.com, per.forlin@...ricsson.com,
jonas.aberg@...ricsson.com, anemo@....ocn.ne.jp
Subject: Re: [PATCHv2] DMAEngine: Let dmac drivers to set chan_id
On 22 July 2011 20:57, Linus Walleij <linus.walleij@...aro.org> wrote:
> On Thu, Jul 21, 2011 at 6:01 AM, Jassi Brar <jaswinder.singh@...aro.org> wrote:
>
>> A DMAC driver might put chan_id to better use by directly
>> mapping system-wide channel numbers on them (and not DMAC
>> relative index).
>
> Sorry, not following this, is the idea that instead of each DMAC
> numbering its own channels [0...N] you want to establish a global
> channel index number [0..N] that is unique across all DMACs
> in the system, even if you have several of them?
>
Something like that.
Some DMACs 'think' they set the chan_id but it is immidiately overwritten
by dma_async_device_register()
So it's not clear whose job is to set it. Apparently the core is just
"doing it for the DMAC driver".
First of all, we need to see if we really want the dmaengine.c to
set it's value?
I think not, because there is no way for a DMAC driver to assign
actually usable channel numbers to chan_id -- there might be 'holes'
in the channel sequence of a DMAC. For ex, some channels of a DMAC
don't reach any peripheral in a particular SoC.
So the 'contiguous' sysfs entries 'dma%dchan%d' only depict
mock numbering, which I am not sure is any useful.
Also, it should be possible to map channel suitability (job of filter function)
onto unique channel ID in a platform.
So client drivers could simply do
bool filter_fn(struct dma_chan *chan, void *ch)
{
return chan->chan_id == ch;
}
And this, imho, should be what we should strive for if we are to have
common clients over different DMACs.
-j
--
Linaro.org │ Open source software for ARM SoCs | Follow Linaro
http://facebook.com/pages/Linaro/155974581091106 -
http://twitter.com/#!/linaroorg - http://linaro.org/linaro-blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists