From: Jon Hunter <jon-hunter@ti.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: devicetree-discuss@lists.ozlabs.org, boojin.kim@samsung.com,
alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org,
swarren@nvidia.com, Padmavathi Venna <padma.v@samsung.com>,
sbkim73@samsung.com, jassisinghbrar@gmail.com,
vinod.koul@intel.com, kgene.kim@samsung.com,
broonie@opensource.wolfsonmicro.com
Subject: Re: [PATCH 2/4] DMA: PL330: Register the DMA controller with the generic DMA helpers
Date: Mon, 28 Jan 2013 15:11:01 -0600 [thread overview]
Message-ID: <5106E965.4080308@ti.com> (raw)
In-Reply-To: <201301281801.13865.arnd@arndb.de>
On 01/28/2013 12:01 PM, Arnd Bergmann wrote:
> On Monday 28 January 2013, Jon Hunter wrote:
>> On 01/28/2013 08:51 AM, Arnd Bergmann wrote:
>>> On Friday 18 January 2013, Padmavathi Venna wrote:
>>>> + pfi = devm_kzalloc(&adev->dev, sizeof(*pfi), GFP_KERNEL);
>>>> + if (!pfi) {
>>>> + dev_err(&adev->dev, "unable to allocate mem\n");
>>>> + return -ENOMEM;
>>>> + }
>>>> +
>>>> + pfi->dma_cap = pd->cap_mask;
>>>> + pfi->filter_fn = pl330_filter;
>>>> +
>>>> + ret = of_dma_controller_register(adev->dev.of_node,
>>>> + of_dma_pl330_xlate, pfi);
>>>
>>> Why do you pass a 'struct of_dma_filter_info' here? I would
>>> expect that you pass the pdmac object as the third argument.
>>
>> I believe it is because that is the data that the xlate function is
>> using. Are you suggesting the data should be stored in the pdmac object
>> and extracted from there? That could be done too given that this
>> controller has its own xlate.
>
> It just seems weird that we are passing a constant cap_mask in
> a data structure, and that we need our own filter function still,
> but don't pass the pointer to the data structure that we actually
> need in the filter function (the dma_device *).
Gotcha. I was still thinking about the generic case, but in this case if
you know the dma controller, it is redundant.
Cheers
Jon
next prev parent reply other threads:[~2013-01-28 21:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-18 11:33 [PATCH 0/4] Add generic DMA DT binding support Padmavathi Venna
2013-01-18 11:33 ` [PATCH 1/4] DMA: PL330: Add xlate function Padmavathi Venna
2013-01-28 14:58 ` Arnd Bergmann
2013-01-29 9:03 ` Padma Venkat
2013-01-29 10:27 ` Arnd Bergmann
2013-01-18 11:33 ` [PATCH 2/4] DMA: PL330: Register the DMA controller with the generic DMA helpers Padmavathi Venna
2013-01-28 14:51 ` Arnd Bergmann
2013-01-28 17:54 ` Jon Hunter
2013-01-28 18:01 ` Arnd Bergmann
2013-01-28 21:11 ` Jon Hunter [this message]
2013-01-18 11:33 ` [PATCH 3/4] ARM: dts: Add #dma-cells for generic dma binding support Padmavathi Venna
2013-01-28 14:47 ` Arnd Bergmann
2013-01-29 8:53 ` Padma Venkat
2013-01-18 11:33 ` [PATCH 4/4] DMA: PL330: Modify pl330 filter based on new generic dma dt bindings Padmavathi Venna
2013-01-28 13:43 ` [PATCH 0/4] Add generic DMA DT binding support Vinod Koul
2013-01-28 15:16 ` Arnd Bergmann
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=5106E965.4080308@ti.com \
--to=jon-hunter@ti.com \
--cc=alsa-devel@alsa-project.org \
--cc=arnd@arndb.de \
--cc=boojin.kim@samsung.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=jassisinghbrar@gmail.com \
--cc=kgene.kim@samsung.com \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=padma.v@samsung.com \
--cc=sbkim73@samsung.com \
--cc=swarren@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.