Thread (78 messages) 78 messages, 7 authors, 2012-06-22

Re: [PATCH V3 1/2] of: Add generic device tree DMA helpers

From: Jassi Brar <hidden>
Date: 2012-05-16 12:37:34
Also in: linux-arm-kernel, linux-omap

Hi Jon,

On 16 May 2012 06:41, Jon Hunter [off-list ref] wrote:
On 05/04/2012 02:01 PM, Jassi Brar wrote:
quoted
+       i2c1: i2c@1 {
+               ...
+               dma = <&sdma 2 1 &sdma 3 2>;
+               ...
+       };
quoted
I see this requires a client driver to specify a particular req_line on a
particular dma controller. I am not sure if this is most optimal.
Actually, no. The phandle in the DT specifies the DMA controller to use.
Then the client simply asks for a channel with a particular property,
for example, DMA_MEM_TO_DEV (ie. TX) and the channel information is return.
See below.
quoted
I think such client->req_line map should be provided to the dmac controller
driver via its dt node in some format. The dmac driver could then populate
a dma_chan, or similar, only for that req_line and not for the unused one
which otherwise could also have served the same client.

Ideally the I2C driver should simply ask, say, a channel for TX and another
for RX, everything else should already be setup via dmac's dt nodes.
Yes that is the intention here.
But the client is required to specify the dmac that would serve it.
Which is more
than simply asking for "some suitable channel".

If you read the whole exchange between I and Stephen, we converged on a
scheme of clients' node having nothing to specify and DMAC told all about
every client in one palce. Which resembles closer to reality and is
much simpler.
I already started on a patchset and should be able submit for review
in a day or two.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help