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: [PATCH resent v2 1/2] ioport : add DEFINE_RES_DMA_SIZE_NAMED macro
Date: Sun, 5 Feb 2012 12:34:15 +0000	[thread overview]
Message-ID: <20120205123415.GY889@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CAMiH66FoX0m_NPntMRyt6zJoYgxuYnzv6neDggmKxW8nfzKJiA@mail.gmail.com>

On Sun, Feb 05, 2012 at 07:53:31PM +0800, Huang Shijie wrote:
> Does any one have any comments about this patch?

Yes.  Having a flat numberspace for DMAs invites the same problems that
we have with the flat IRQ numberspace when it comes to having multiple
DMA controllers.

With DMA engine drivers, channels are allocated using a match function
and unspecified match data.  While a linear numberspace can be used,
that sets itself up for clashing between different DMA controllers
especially if the numberspace overlaps.

What's missing from this patch set is an illustration of how this will
be used.

Another issue here is that having the peripheral drivers know about the
exact match function and what data the DMA engines require ties the
periperal drivers to their respective DMA engine.  One of the points of
DMA engine is to separate that knowledge, so that the same peripheral IP
can be re-used with different DMA engines.

To encode knowledge of the DMA engine into the peripheral driver basically
destroys the purpose of having a DMA engine API.

So, I believe that _if_ we are going down the path of using the DMA engine
API for our SoCs, we really don't want to invent a linear DMA numberspace
by putting DMA numbers into resources.

  reply	other threads:[~2012-02-05 12:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-19  7:53 [PATCH resent v2 0/2] ARM/mxs : add GPMI-NAND support for imx23/imx28 Huang Shijie
2012-01-19  7:53 ` [PATCH resent v2 1/2] ioport : add DEFINE_RES_DMA_SIZE_NAMED macro Huang Shijie
2012-01-19  8:14   ` Shawn Guo
2012-01-19  8:23     ` Huang Shijie
2012-01-19  8:27       ` Huang Shijie
2012-01-19  8:55         ` Shawn Guo
2012-02-05 11:53   ` Huang Shijie
2012-02-05 12:34     ` Russell King - ARM Linux [this message]
2012-02-05 16:22       ` Huang Shijie
2012-01-19  7:53 ` [PATCH resent v2 2/2] ARM: mxs: add GPMI-NAND support for imx23/imx28 Huang Shijie

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=20120205123415.GY889@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).