From: Stephen Warren <swarren@wwwdotorg.org>
To: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Richard Zhao <rizhao@nvidia.com>,
linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, vinod.koul@intel.com,
djbw@fb.com
Subject: Re: [PATCH] DMA: let filter functions of of_dma_simple_xlate possible check of_node
Date: Fri, 02 Aug 2013 14:52:01 -0600 [thread overview]
Message-ID: <51FC1BF1.7080401@wwwdotorg.org> (raw)
In-Reply-To: <51FBA0BB.6080408@ti.com>
On 08/02/2013 06:06 AM, Santosh Shilimkar wrote:
> On Thursday 01 August 2013 10:00 PM, Richard Zhao wrote:
>> pass of_phandle_args dma_spec to dma_request_channel in of_dma_simple_xlate,
>> so the filter function could access of_node in of_phandle_args.
>>
> Am just curious the reasoning behind doing so. Can you please expand
> above bit more with why you need to change it.
I believe that this patch is attempting to solve an issue I pointed out
with the following patch, which enhances the Tegra DMA controller driver
to support the standard DMA DT bindings:
https://lkml.org/lkml/2013/7/24/7
[PATCH 2/9] dma: tegra20-apbdma: move to generic device tree bindings
The issue is in particular that patch included:
> +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;
> +}
Which is checking that the provider of the DMA channel is the correct
DMA controller. The DMA core should be able to work this out, since at
least under DT, the DT property specifies both the DMA controller's
phandle and the DMA specifier, so that DMA core should be able to
validate that it only attempts to match DMA channels for the specified
DMA controller, without each DMA controller driver having to implement a
custom filter function to do that.
next prev parent reply other threads:[~2013-08-02 20:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-02 2:00 [PATCH] DMA: let filter functions of of_dma_simple_xlate possible check of_node Richard Zhao
2013-08-02 12:06 ` Santosh Shilimkar
2013-08-02 20:52 ` Stephen Warren [this message]
2013-08-22 5:19 ` Richard Zhao
2013-08-22 20:18 ` Stephen Warren
2013-08-23 1:29 ` Richard Zhao
2013-08-23 15:57 ` Stephen Warren
2013-08-26 12:17 ` Laurent Pinchart
2013-08-26 12:55 ` Richard Zhao
2013-08-26 13:18 ` Laurent Pinchart
2013-08-26 14:10 ` Vinod Koul
2013-08-26 18:15 ` Arnd Bergmann
2013-08-28 5:37 ` Vinod Koul
2013-08-26 14:49 ` Richard Zhao
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=51FC1BF1.7080401@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=djbw@fb.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=rizhao@nvidia.com \
--cc=santosh.shilimkar@ti.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