From: Richard Zhao <rizhao-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
Cc: "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
"rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org"
<rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
"vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org"
<vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
"djbw-b10kYP2dOMg@public.gmane.org"
<djbw-b10kYP2dOMg@public.gmane.org>
Subject: Re: [PATCH 2/9] dma: tegra20-apbdma: move to generic device tree bindings
Date: Wed, 31 Jul 2013 11:52:56 +0800 [thread overview]
Message-ID: <20130731035256.GR15855@rizhao-lap> (raw)
In-Reply-To: <51F7ED62.4060404-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
On Wed, Jul 31, 2013 at 12:44:18AM +0800, Stephen Warren wrote:
> On 07/29/2013 09:06 PM, Richard Zhao wrote:
> > On Sat, Jul 27, 2013 at 03:27:58AM +0800, Stephen Warren wrote:
> >> (Stripping the Cc list a lot)
> >>
> >> On 07/23/2013 10:09 PM, Richard Zhao wrote:
> >>> Update tegra20-apbdma driver to adopt generic DMA device tree bindings.
> >>> It calls of_dma_controller_register() with of_dma_simple_xlate to get
> >>> the generic DMA device tree helper support. The #dma-cells for apbdma
> >>> must be 1, which is slave ID.
> >>>
> >>> The existing nvidia,dma-request-selector still works there, and the
> >>> support will be removed after all clients get converted to generic DMA
> >>> device tree helper.
>
> >>> diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
> >>
> >>> +static bool tegra_dma_filter_fn(struct dma_chan *dc, void *param)
> >>> +{
> >>> + if (dc->device->dev->driver == &tegra_dmac_driver.driver) {
> >>> + struct tegra_dma_channel *tdc = to_tegra_dma_chan(dc);
> >>> + unsigned req = *(unsigned *)param;
> >>> +
> >>> + tdc->slave_id = req;
> >>> +
> >>> + return true;
> >>> + }
> >>> + return false;
> >>> +}
> >>> +
> >>> +static struct of_dma_filter_info tegra_dma_info = {
> >>> + .filter_fn = tegra_dma_filter_fn,
> >>> +};
> >>
> >> Why does this driver need to define a filter function? I thought the
> >> dmaengine's DT support would already match DMA clients/engines based on
> >> the phandle in DT? Isn't the need to pass the slave channel ID into
> >> drivers something pretty fundamental to dmaengine, and hence something
> >> it already supports?
> >
> > of_dma_simple_xlate only pass slave id to filter function. It needs
> > change to pass dt node too. I didn't start work on the common code
> > change yet. Do you think we need to hold it until common code change?
>
> Oh dear, I can't see how the core DT DMA support can work for anyone
> without the ability to limit DMA clients to the specific DMA controller
> that's specified in DT. If that functionality truly is missing, then it
> certainly needs to be added first.
omap-dma uses the same way.
next prev parent reply other threads:[~2013-07-31 3:52 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-24 4:09 [PATCH 0/9] ARM: tegra: move to generic DMA DT binding Richard Zhao
2013-07-24 4:09 ` [PATCH 1/9] ARM: dts: add generic DMA DT binding for tegra apbdma Richard Zhao
[not found] ` <1374639002-16753-2-git-send-email-rizhao-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-07-26 19:21 ` Stephen Warren
[not found] ` <51F2CC30.5090200-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-07-30 2:54 ` Richard Zhao
2013-07-30 16:49 ` Stephen Warren
[not found] ` <51F7EE81.1060105-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-08-01 2:49 ` Richard Zhao
2013-07-24 4:09 ` [PATCH 2/9] dma: tegra20-apbdma: move to generic device tree bindings Richard Zhao
[not found] ` <1374639002-16753-3-git-send-email-rizhao-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-07-26 19:27 ` Stephen Warren
[not found] ` <51F2CDBE.40802-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-07-30 3:06 ` Richard Zhao
2013-07-30 16:44 ` Stephen Warren
[not found] ` <51F7ED62.4060404-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-07-31 3:52 ` Richard Zhao [this message]
2013-07-31 21:33 ` Stephen Warren
2013-07-24 4:09 ` [PATCH 3/9] spi: tegra114: move to generic dma DT binding Richard Zhao
2013-07-26 19:34 ` Stephen Warren
2013-07-30 3:15 ` Richard Zhao
2013-07-30 16:44 ` Stephen Warren
2013-07-24 4:09 ` [PATCH 4/9] spi: tegra20-slink: " Richard Zhao
2013-07-24 4:09 ` [PATCH 5/9] spi: tegra20-sflash: " Richard Zhao
[not found] ` <1374639002-16753-6-git-send-email-rizhao-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-07-26 19:36 ` Stephen Warren
[not found] ` <51F2CFAB.4000609-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-07-30 3:16 ` Richard Zhao
2013-07-24 4:09 ` [PATCH 6/9] serial: tegra: " Richard Zhao
2013-07-26 19:39 ` Stephen Warren
2013-07-26 19:41 ` Stephen Warren
[not found] ` <51F2D063.5010505-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-07-30 3:31 ` Richard Zhao
2013-07-30 16:46 ` Stephen Warren
2013-07-31 3:45 ` Richard Zhao
2013-07-31 21:32 ` Stephen Warren
[not found] ` <51F98275.6020906-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-08-01 3:30 ` Richard Zhao
2013-08-01 3:45 ` Stephen Warren
2013-07-24 4:10 ` [PATCH 7/9] ASoC: tegra: move to generic DMA " Richard Zhao
2013-07-24 6:58 ` Lars-Peter Clausen
[not found] ` <1374639002-16753-8-git-send-email-rizhao-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-07-26 19:58 ` Stephen Warren
[not found] ` <51F2D4DD.9060308-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-07-30 10:12 ` Richard Zhao
2013-07-30 16:54 ` Stephen Warren
2013-07-24 4:10 ` [PATCH 8/9] ARM: dts: tegra: remove legacy nvidia,dma-request-selector properties Richard Zhao
[not found] ` <1374639002-16753-9-git-send-email-rizhao-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-07-26 19:59 ` Stephen Warren
[not found] ` <51F2D525.7060605-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-07-30 10:16 ` Richard Zhao
2013-07-24 4:10 ` [PATCH 9/9] dma: tegra20-apbdma: remove legacy nvidia,dma-request-selector support Richard Zhao
2013-07-26 19:25 ` [PATCH 0/9] ARM: tegra: move to generic DMA DT binding Stephen Warren
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=20130731035256.GR15855@rizhao-lap \
--to=rizhao-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=djbw-b10kYP2dOMg@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
--cc=vinod.koul-ral2JQCrhuEAvxtiuMwx3w@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