From: jaswinder.singh@linaro.org (Jassi Brar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V3 1/2] of: Add generic device tree DMA helpers
Date: Thu, 17 May 2012 02:46:38 +0530 [thread overview]
Message-ID: <CAJe_ZhebPfmLS8ur8FAnmdj37ye25HrE2QF-Qk5PVDnzmpAniQ@mail.gmail.com> (raw)
In-Reply-To: <201205161942.20296.arnd@arndb.de>
On 17 May 2012 01:12, Arnd Bergmann <arnd@arndb.de> wrote:
>>
>> Generic binding to provide a way to provide the client-channel map and
>> other dmac specific parameters to the dma controller driver
>>
>> DMA Model:-
>> ? Only the most common characteristics of a dma setup are assumed
>> in this binding.
>> Client: Some h/w controller that could request a DMA controller in
>> the system to perform data transfer on its behalf. Example SPI, MMC,
>> I2S etc.
>> DMAC: A DMA Controller instance. Example, PL330, PL08X, SDMA etc.
>>
>> ?The assumed model of the DMAC, in this binding, has P peripheral
>> interfaces (P request signals) that could request a data transfer
>> and C physical channels that actually do the data transfers, hence,
>> at most C out of P peripherals could be served by the DMAC at any
>> point of time. Usually C := P, but not always. Usually, any of the
>> physical channels could be employed by the DMAC driver to serve any
>> client.
>> ?The DMAC driver identifies a client by its i/f number, 'peri_id'
>> on the given DMAC. For example, TX for SPI has 7th while RX_TX
>> (half-duplex) for MMC has 10th peripheral interface (request-signal)
>> on a given DMAC. Usually, any of the physical channels could be
>> employed by the DMAC driver to serve a client.
>
Btw, just to be clear... this is not _my_ setup.
The dma controller manuals might use different terms but underneath
most(if not all) dma controllers fit this model. At lease every dmac
on Samsung SoCs and ARM's PL330 and PL08x does.
In fact, I have trouble imaging some dmac not conforming to this model...
but then again it could be just me.
> I'm still anything but convinced by this model. Basically it's the
> exact opposite of what we do for every other subsystem (irq, pinctrl,
> regulator, gpio, ...), where the device using some infrastructure
> contains the information about who provides it, whereas here you
> move all the information into the device that provides the functionality,
> and have no handle in the device using it by which the driver can
> identify it.
>
The idea was that a client shouldn't need to know/tell which dma controller
serves it or which peripheral interface of a dma controller.
I think in future third-party device IPs, like ARM's Primecell, are only gonna
get more common so it makes even more sense.
> I believe that it can work and that it solves the problem you are
> faced with at minimal complexity, but you put the burden of this
> complexity on everybody who does not have this issue, and make
> the general binding confusing and harder to read.
>
I am sorry if I gave you the wrong impression, but I didn't intend to just
scratch my personal itch. I truly believed I and Stephen reached a generic
solution i.e, as much as it could be.
> It also adds much more data to the device tree (in source and binary form)
> because you need to describe every device using a dma controller
> and have a label to reference it.
>
I don't see why one can't add entries to chan-map as and when more
clients appear for the DMAC ? It should be perfectly ok to specify less
than the maximum possible clients in chan-map.
Requiring labels - yes, doesn't sound very nice, but many nodes already do.
> More importantly, you make it very hard to add devices in a board file
> to a dma controller that already has descriptions for some channels,
> because you cannot easily extend the chan-map unless you rewrite all of it.
>
I am not sure I understand the point.
> We really need something simpler than this for the common case.
> I have already made suggestions for how to make it still possible
> to cover the corner case of multiple dma engines connected to the
> same slave, which would keep the complexity local to those devices
> that actually need it.
>
Thanks $DEITY, I posted a preview. Maybe I should put it on hold.
And thank you for speaking up immediately. Really!
next prev parent reply other threads:[~2012-05-16 21:16 UTC|newest]
Thread overview: 129+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-30 21:17 [PATCH V3 1/2] of: Add generic device tree DMA helpers Jon Hunter
2012-05-03 22:26 ` Stephen Warren
2012-05-03 23:25 ` Russell King - ARM Linux
2012-05-04 12:39 ` Arnd Bergmann
2012-05-04 15:06 ` Jon Hunter
2012-05-04 15:14 ` Russell King - ARM Linux
2012-05-04 18:21 ` Stephen Warren
2012-05-04 19:19 ` Jon Hunter
2012-05-04 6:56 ` Jassi Brar
2012-05-04 15:17 ` Jon Hunter
2012-05-04 19:01 ` Jassi Brar
2012-05-04 19:23 ` Arnd Bergmann
2012-05-05 17:10 ` Jassi Brar
2012-05-07 15:53 ` Stephen Warren
2012-05-07 17:19 ` Jassi Brar
2012-05-08 16:35 ` Stephen Warren
2012-05-08 19:09 ` Jassi Brar
2012-05-09 12:30 ` Arnd Bergmann
2012-05-09 19:10 ` Stephen Warren
2012-05-09 21:38 ` Jassi Brar
2012-05-10 17:00 ` Stephen Warren
2012-05-10 19:59 ` Jassi Brar
2012-05-11 19:28 ` Stephen Warren
2012-05-11 21:06 ` Jassi Brar
2012-05-11 23:51 ` Stephen Warren
2012-05-12 13:40 ` Jassi Brar
2012-05-16 1:05 ` Jon Hunter
2012-05-17 13:18 ` Russell King - ARM Linux
2012-05-07 17:21 ` Arnd Bergmann
2012-05-16 1:11 ` Jon Hunter
2012-05-16 12:37 ` Jassi Brar
2012-05-16 13:15 ` Jon Hunter
2012-05-16 15:44 ` Stephen Warren
2012-05-16 16:04 ` Jon Hunter
2012-05-16 16:01 ` Jon Hunter
2012-05-16 16:15 ` Stephen Warren
2012-05-16 16:22 ` Jassi Brar
2012-05-16 17:09 ` Jon Hunter
2012-05-16 19:42 ` Arnd Bergmann
2012-05-16 21:16 ` Jassi Brar [this message]
2012-05-17 19:32 ` Stephen Warren
2012-05-18 17:12 ` Jassi Brar
2012-05-18 21:04 ` Arnd Bergmann
2012-05-16 23:59 ` Stephen Warren
2012-05-17 4:05 ` Jassi Brar
2012-05-18 20:49 ` Arnd Bergmann
2012-05-18 21:07 ` Stephen Warren
2012-05-18 21:43 ` Arnd Bergmann
2012-05-18 22:20 ` Stephen Warren
2012-05-19 8:44 ` Arnd Bergmann
2012-05-21 17:33 ` Stephen Warren
2012-05-21 18:18 ` Arnd Bergmann
2012-05-21 20:32 ` Stephen Warren
2012-06-08 19:04 ` Jon Hunter
2012-06-09 0:04 ` Arnd Bergmann
2012-06-13 22:32 ` Jon Hunter
2012-06-14 4:45 ` Jassi Brar
2012-06-14 11:48 ` Arnd Bergmann
2012-06-14 15:39 ` Jon Hunter
2012-06-15 8:40 ` Arnd Bergmann
2012-06-22 22:52 ` Jon Hunter
2012-06-22 23:12 ` Russell King - ARM Linux
2012-06-25 16:51 ` Jon Hunter
2012-06-25 18:04 ` Vinod Koul
2012-06-25 20:30 ` Arnd Bergmann
2012-06-26 9:40 ` Vinod Koul
2012-06-26 14:59 ` Arnd Bergmann
2012-06-26 17:50 ` Vinod Koul
2012-06-26 20:27 ` Arnd Bergmann
2012-06-27 13:45 ` Vinod Koul
2012-06-27 15:20 ` Arnd Bergmann
2012-07-13 6:45 ` Vinod Koul
2012-07-13 21:52 ` Guennadi Liakhovetski
2012-07-17 19:24 ` Arnd Bergmann
2012-07-20 4:00 ` Vinod Koul
2012-07-20 8:39 ` Arnd Bergmann
2012-07-20 9:37 ` Vinod Koul
2012-07-24 19:07 ` Jon Hunter
2012-07-24 19:27 ` Arnd Bergmann
2012-07-26 6:42 ` Vinod Koul
2012-07-26 7:14 ` Arnd Bergmann
2012-07-26 11:28 ` Vinod Koul
2012-07-26 15:53 ` Jon Hunter
2012-07-31 11:06 ` Vinod Koul
2012-07-26 17:43 ` Jon Hunter
2012-07-31 11:12 ` Vinod Koul
2012-08-01 20:43 ` Jon Hunter
2012-08-03 9:55 ` Vinod Koul
2012-07-20 9:08 ` Robert Jarzmik
2012-07-20 9:41 ` Vinod Koul
2012-07-26 4:56 ` zhangfei gao
2012-07-23 21:29 ` Stephen Warren
2012-07-24 7:19 ` Arnd Bergmann
2012-07-24 16:04 ` Stephen Warren
2012-07-24 18:55 ` Arnd Bergmann
2012-07-24 12:54 ` Sergei Shtylyov
2012-07-06 11:36 ` Guennadi Liakhovetski
2012-07-06 15:28 ` Arnd Bergmann
2012-07-06 15:43 ` Guennadi Liakhovetski
2012-07-06 17:31 ` Arnd Bergmann
2012-07-06 21:01 ` Russell King - ARM Linux
2012-07-06 20:57 ` Russell King - ARM Linux
2012-07-06 22:49 ` Guennadi Liakhovetski
2012-07-13 6:51 ` Vinod Koul
2012-06-14 15:17 ` Guennadi Liakhovetski
2012-06-14 21:52 ` Jon Hunter
2012-06-15 8:41 ` Guennadi Liakhovetski
2012-06-15 9:00 ` Arnd Bergmann
2012-06-15 9:18 ` Guennadi Liakhovetski
2012-06-15 11:27 ` Arnd Bergmann
2012-06-15 16:11 ` Mitch Bradley
2012-06-16 6:56 ` Arnd Bergmann
2012-06-21 11:21 ` Guennadi Liakhovetski
2012-06-21 14:56 ` Arnd Bergmann
2012-05-17 13:22 ` Russell King - ARM Linux
2012-05-17 13:52 ` Mark Brown
2012-05-17 14:16 ` Russell King - ARM Linux
2012-05-16 16:16 ` Jassi Brar
2012-05-16 17:12 ` Jon Hunter
2012-05-16 17:24 ` Jassi Brar
2012-05-16 17:37 ` Jon Hunter
2012-05-16 17:46 ` Stephen Warren
2012-05-16 18:03 ` Jon Hunter
2012-05-04 15:22 ` Jon Hunter
2012-05-04 15:56 ` Arnd Bergmann
2012-05-04 17:19 ` Jon Hunter
2012-05-04 19:06 ` Arnd Bergmann
2012-05-04 19:26 ` Jon Hunter
2012-05-04 18:30 ` 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=CAJe_ZhebPfmLS8ur8FAnmdj37ye25HrE2QF-Qk5PVDnzmpAniQ@mail.gmail.com \
--to=jaswinder.singh@linaro.org \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).