linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH] of: DMA helpers: manage generic requests specification
Date: Mon, 5 Mar 2012 19:57:54 +0000	[thread overview]
Message-ID: <20120305195754.GA20359@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <74CDBE0F657A3D45AFBB94109FB122FF17BE861C6E@HQMAIL01.nvidia.com>

On Mon, Mar 05, 2012 at 10:30:43AM -0800, Stephen Warren wrote:
> Cousson, Benoit wrote at Monday, March 05, 2012 6:14 AM:
> > Beside u32 and string, do we know what kind of parameters we can expect
> > to retrieve?
> > Because we can potentially reduce the scope to these two types only.
> 
> I wondered whether different drivers would return arbitrary driver-specific
> structs, so that the DT specific would encode not only the DMA request
> number, but perhaps some/all of the DMA parameters like transfer size,
> wrap, even DMA FIFO address, ...

Right.  The thing to consider here is: what information does the driver
already have about the device?

- physical address of the data register
- size of the data register
- it certainly should know the fifo depth (think - if it has to do PIO
  then it needs this information already.)

so, there's no point putting that information into DT because it must be
known by the driver for systems not using DMA.

We have a standardized way to pass this information to DMA engine drivers
from the peripheral device driver: struct dma_slave_config.

What is outside of the scope of the driver is knowing how a peripheral
device is connected to a set of DMA engines.  That's a much harder
problem to solve because there's many varied ways to do that in hardware,
from a static mapping between the peripheral and a DMA engine request
signal, to implementations which have some kind of front end MUX, to
there being several choices of DMA engine for the peripheral (I believe
some Samsung platforms fall into this category.)

Some of those problems can be solved by redesigning the DMA engine
drivers to have a clear way to handle DMA engines with multiple request
inputs shared between multiple channels: you treat the individual request
inputs as separate DMA engine channels, and when there is work to be
done, you allocate the DMA engine channel to a physical DMA engine and
physical channel.

That's not going to be easy to do at the moment, because every DMA
engine driver is custom written from the ground up with no commonality
between them (I've mentioned this in previous email threads.)

I think, before trying to design some kind of DT based representation
of how to bind DMA stuff to peripheral drivers, the very first thing
that needs to happen is the DMA engine drivers need sorting so that
they all work in mostly the same way in terms of how channels are
allocated to peripherals.  Only once we have a consistent way that's
done can we then start looking at what kind of representation is needed
to bind the two together.

Otherwise, we're going to end up with the OMAP way of binding channels,
the PL08x way, the SA11x0 way, etc and its going to become very very
unfunny to sort this out later.

  reply	other threads:[~2012-03-05 19:57 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-27 17:29 [RFC PATCH 1/2] of: Add generic device tree DMA helpers Cousson, Benoit
2012-01-27 18:13 ` Stephen Warren
2012-01-27 20:36   ` Cousson, Benoit
2012-01-28 18:12     ` Grant Likely
2012-01-28 18:06 ` Grant Likely
2012-01-31 21:26   ` Cousson, Benoit
2012-02-02  4:52     ` Grant Likely
2012-01-31 23:09   ` Russell King - ARM Linux
2012-02-01 10:50     ` Cousson, Benoit
2012-02-02  8:45       ` Russell King - ARM Linux
2012-02-02  8:54         ` Cousson, Benoit
2012-02-22 10:59 ` Nicolas Ferre
2012-02-23 10:03   ` Cousson, Benoit
2012-02-23 15:51     ` Nicolas Ferre
2012-02-23 15:57       ` Cousson, Benoit
2012-02-27 13:09         ` Nicolas Ferre
2012-02-27 14:22           ` Cousson, Benoit
2012-02-27 17:28             ` Nicolas Ferre
2012-02-29 14:54 ` [RFC PATCH] of: DMA helpers: manage generic requests specification Nicolas Ferre
2012-02-29 20:54   ` Stephen Warren
2012-03-05 13:14     ` Cousson, Benoit
2012-03-05 18:30       ` Stephen Warren
2012-03-05 19:57         ` Russell King - ARM Linux [this message]
2012-03-05 10:55   ` Cousson, Benoit
2012-03-05 15:36   ` Grant Likely
2012-03-14 17:47     ` Nicolas Ferre
2012-03-14 18:16       ` Stephen Warren
2012-03-15  8:38 ` [PATCH] of: Add generic device tree DMA helpers Nicolas Ferre
2012-03-15  9:22   ` Arnd Bergmann
2012-03-15  9:26     ` Russell King - ARM Linux
2012-03-15 10:09       ` Arnd Bergmann
2012-03-17  9:42       ` Grant Likely
2012-03-17 16:03         ` Arnd Bergmann
2012-03-18  9:08           ` Grant Likely
2012-03-15 10:27     ` Thierry Reding
2012-03-17 10:47       ` Grant Likely
2012-03-18  9:22         ` Thierry Reding
2012-03-18 15:10           ` Arnd Bergmann
2012-03-18 18:22           ` Grant Likely
2012-03-19 13:02         ` Mark Brown
2012-03-19 15:01           ` Arnd Bergmann
2012-03-19 15:07             ` Stephen Warren
2012-03-19 15:45               ` Arnd Bergmann
2012-03-19 16:54                 ` Stephen Warren
2012-03-15 16:30     ` Cousson, Benoit
2012-03-15 19:57       ` Russell King - ARM Linux
2012-03-15 20:41         ` Arnd Bergmann
2012-03-15 21:39           ` Cousson, Benoit
2012-03-15 21:55             ` Russell King - ARM Linux
2012-03-16  9:56               ` Arnd Bergmann
2012-03-20 14:02             ` Matt Porter
2012-03-15 23:45         ` Nicolas Pitre
2012-03-16 10:03   ` Arnd Bergmann
2012-03-16 11:19     ` Cousson, Benoit
2012-03-16 12:04       ` Arnd Bergmann
2012-03-16 13:28         ` Cousson, Benoit
2012-03-16 13:36           ` Nicolas Ferre
2012-03-17  9:40   ` Grant Likely
2012-03-18 20:13     ` Arnd Bergmann
2012-03-18 20:44       ` Grant Likely
2012-03-18 21:58         ` Arnd Bergmann
2012-03-18 22:12           ` Arnd Bergmann
2012-03-19 13:37       ` Nicolas Ferre
2012-03-19 15:20         ` Russell King - ARM Linux
2012-03-19 15:58           ` Cousson, Benoit
2012-03-19 13:30     ` Nicolas Ferre
2012-03-19 14:06       ` Arnd Bergmann
2012-03-19 15:33         ` Russell King - ARM Linux
2012-03-19 16:11           ` Arnd Bergmann
2012-03-19 18:06             ` Jassi Brar
2012-03-19 16:31           ` Nicolas Ferre
2012-03-19 17:49             ` Cousson, Benoit
2012-03-19 14:45       ` Grant Likely
2012-03-20 14:54         ` Nicolas Ferre
2012-03-20 10:13   ` [PATCH v2 1/2] " Nicolas Ferre
2012-03-20 10:13     ` [PATCH 2/2] of: selftest/dma: Add selftest for new DT DMA request helpers Nicolas Ferre
2012-03-20 14:16       ` Grant Likely
2012-03-20 10:17     ` [PATCH] of: dma/fixup Nicolas Ferre
2012-03-20 13:03     ` [PATCH v2 1/2] of: Add generic device tree DMA helpers Arnd Bergmann
2012-03-20 15:38     ` 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=20120305195754.GA20359@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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).