From: Paul Mundt <lethal@linux-sh.org>
To: Magnus Damm <magnus.damm@gmail.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
Vinod Koul <vinod.koul@intel.com>,
linux-sh@vger.kernel.org, linux-mmc@vger.kernel.org,
Chris Ball <cjb@laptop.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/4] dma: sh: provide a migration path for slave drivers to stop using .private
Date: Thu, 12 Jul 2012 04:00:19 +0000 [thread overview]
Message-ID: <20120712040018.GB11440@linux-sh.org> (raw)
In-Reply-To: <CANqRtoRz2NF6BEEYcy_BwZ7Hm5EF9zP2Z0eoQcbxaSfUuc2i9Q@mail.gmail.com>
On Thu, Jul 12, 2012 at 06:55:32AM +0900, Magnus Damm wrote:
> Hi Guennadi,
>
> [CC Paul]
>
> On Thu, Jul 5, 2012 at 1:17 AM, Guennadi Liakhovetski
> <g.liakhovetski@gmx.de> wrote:
> > This patch extends the sh dmaengine driver to support the preferred channel
> > selection and configuration method, instead of using the "private" field
> > from struct dma_chan. We add a standard filter function to be used by
> > slave drivers instead of implementing their own ones, and add support for
> > the DMA_SLAVE_CONFIG control operation, which must accompany the new
> > channel selection method. We still support the legacy .private channel
> > allocation method to cater for a smooth driver migration.
> >
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > ---
>
> Thanks for your efforts on this. Something that caught my eye in this
> patch is this portion:
>
> +bool shdma_chan_filter(struct dma_chan *chan, void *arg);
>
> If we would use this function in our DMA Engine slave drivers (MMCIF,
> SDHI, SCIF, FSI, SIU and so on) then wouldn't we add a strict
> dependency on this symbol provided by this particular DMA Engine
> driver implementation for the DMAC hardware (that your patch
> modifies)?
>
> And what do we do if we want to use the same DMA Engine slave driver
> with a different DMA Engine driver implementation?
>
> From my point of view, there must be some better way to not have such
> tight dependencies between the DMA Engine slave consumer and the DMA
> Engine driver. Not sure what that looks like though. This symbol
> dependency is pretty far from great IMO.
>
I vaguely recall this coming up before, and it wasn't acceptable then
either.
We will by no means be adding driver-specific hooks in to other drivers
that really couldn't care less what the underlying DMA engine driving
them is.
We already have CPUs with different DMA engines that can be used by the
same drivers. As I said the last time, this needs to be fixed in the
dmaengine framework, period.
next prev parent reply other threads:[~2012-07-12 4:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-04 16:17 [PATCH 0/4] dma: sh: stop using .private Guennadi Liakhovetski
2012-07-04 16:17 ` [PATCH 1/4] dmaengine: shdma: prepare to stop using struct dma_chan::private Guennadi Liakhovetski
2012-07-04 16:17 ` [PATCH 2/4] dma: sh: use an integer slave ID to improve API compatibility Guennadi Liakhovetski
2012-07-04 16:17 ` [PATCH 3/4] dma: sh: provide a migration path for slave drivers to stop using .private Guennadi Liakhovetski
2012-07-11 21:55 ` Magnus Damm
2012-07-12 4:00 ` Paul Mundt [this message]
2012-07-12 8:34 ` Guennadi Liakhovetski
2012-07-04 16:17 ` [PATCH 4/4] mmc: sh_mmcif: switch to the new DMA channel allocation and configuration Guennadi Liakhovetski
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=20120712040018.GB11440@linux-sh.org \
--to=lethal@linux-sh.org \
--cc=cjb@laptop.org \
--cc=g.liakhovetski@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.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 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).