linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/8] ARM i.MX dma: implement wrapper for dma functions
Date: Tue, 10 Aug 2010 14:34:26 +0200	[thread overview]
Message-ID: <20100810123426.GH27749@pengutronix.de> (raw)
In-Reply-To: <AANLkTimtQrmrW-pNWX=0J9GMsGrS-5-LZKkxdHDSuSxW@mail.gmail.com>

Hi Linus,

On Tue, Aug 10, 2010 at 12:45:17AM +0200, Linus Walleij wrote:
> 2010/8/9 Sascha Hauer <s.hauer@pengutronix.de>:
> 
> > Currently there is only one i.MX DMA implementation in the tree,
> > the one for i.MX1/21/27. The SDMA support for i.MX25/31/35/51 can
> > be implemented similarly. This wrapper for the DMA is implemented
> > so that drivers do not have to care about the implementation
> > present and don't have to #ifdef DMA support
> >
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > (...)
> > +struct imx_dma_operations {
> > + ? ? ? int (*config_channel)(int channel, struct imx_dma_config *cfg);
> > + ? ? ? int (*setup_single)(int channel, dma_addr_t mem, int dma_length,
> > + ? ? ? ? ? ? ? unsigned int dmamode);
> > + ? ? ? int (*setup_sg)(int channel, struct scatterlist *sg,
> > + ? ? ? ? ? ? ? ? ? ? ? unsigned int sgcount, unsigned int dma_length,
> > + ? ? ? ? ? ? ? ? ? ? ? unsigned int dmamode);
> > + ? ? ? void (*enable)(int channel);
> > + ? ? ? void (*disable)(int channel);
> > + ? ? ? int (*request)(enum imx_dma_prio);
> > + ? ? ? void (*free)(int channel);
> > + ? ? ? int num_channels;
> > +};
> 
> This is just getting *so* close to the drivers/dma dmaengine API.

I was afraid somewone would say this ;)

> 
> We decided to use the damengine for all our DMA drivers and we
> haven't regretted one bit.
> 
> There has been some noise about too many drivers stacking up
> below arch/arm instead of going to the apropriate subsystem, can't
> you atleast contemplate using the dmaengine and help us improve
> that subsystem?

The last time I looked into dmaengine I failed to see how this API
could help me. Looking at it again it seems that this is the way
to go. I will definitely have a closer look. I can't promise though that
this will be before the next merge window. The SDMA engine on the other
hand is of great value for the i.MX community, so if anyone is willing
to help here, please step forward.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2010-08-10 12:34 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-09  9:05 [RFC] SDMA support for i.MX Sascha Hauer
2010-08-09  9:05 ` [PATCH 1/8] ARM i.MX dma: implement wrapper for dma functions Sascha Hauer
2010-08-09 18:43   ` Magnus Lilja
2010-08-09 22:45   ` Linus Walleij
2010-08-10 12:34     ` Sascha Hauer [this message]
2010-08-09  9:05 ` [PATCH 2/8] ARM i.MX dma-mx1-mx2: use wrapper Sascha Hauer
2010-08-09 18:51   ` Magnus Lilja
2010-08-09 21:42     ` Sascha Hauer
2010-08-09  9:05 ` [PATCH 3/8] mxcmmc: use new dma api Sascha Hauer
2010-08-09  9:05 ` [PATCH 4/8] ARM i.MX: add SDMA driver Sascha Hauer
2010-08-09 19:04   ` Magnus Lilja
2010-08-10  7:15     ` Sascha Hauer
2010-08-10  9:20   ` Detlev Zundel
2010-08-10 13:46     ` Timur Tabi
2010-08-10 14:03       ` Lothar Waßmann
2010-08-10 14:08         ` Tabi Timur-B04825
2010-08-10 14:19           ` Detlev Zundel
2010-08-10 19:08   ` Uwe Kleine-König
2010-08-09  9:05 ` [PATCH 5/8] ARM i.MX3: Add sdma device Sascha Hauer
2010-08-09  9:05 ` [PATCH 6/8] ARM i.MX3: add dma request defines Sascha Hauer
2010-08-09 13:53   ` Uwe Kleine-König
2010-08-09  9:05 ` [PATCH 7/8] ARM i.MX3: add dma request resources to ssi/sdhc devices Sascha Hauer
2010-08-09  9:05 ` [PATCH 8/8] ASoC i.MX: switch to new DMA api Sascha Hauer
2010-08-10 13:21   ` Mark Brown
2010-08-09 18:38 ` [RFC] SDMA support for i.MX Magnus Lilja

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=20100810123426.GH27749@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --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).