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 3/3 v2] dmaengine: Add Freescale i.MX SDMA support
Date: Sat, 28 Aug 2010 19:20:10 +0200	[thread overview]
Message-ID: <20100828172010.GJ1473@pengutronix.de> (raw)
In-Reply-To: <201008281830.05208.marek.vasut@gmail.com>

On Sat, Aug 28, 2010 at 06:30:05PM +0200, Marek Vasut wrote:
> Dne So 28. srpna 2010 18:18:58 Sascha Hauer napsal(a):
> > On Sat, Aug 28, 2010 at 05:27:10PM +0200, Marek Vasut wrote:
> > > Dne So 28. srpna 2010 17:18:17 Linus Walleij napsal(a):
> > > > 2010/8/23 Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>:
> > > > >> +     evt = readl(SDMA_H_EVTOVR);
> > > > >> +     mcu = readl(SDMA_H_HOSTOVR);
> > > > >> +     dsp = readl(SDMA_H_DSPOVR);
> > > > > 
> > > > > __raw_readl?
> > > > 
> > > > Sorry I never understood this __raw_[read|write][b|w|l] vs.
> > > > plain read[b|w|l] proliferation in some drivers and code.
> > > > 
> > > > What's the reason for?
> > > 
> > > Hey,
> > > 
> > > this trick is, if you create the VA<->PA mapping at the kernel start (eg.
> > > see how pxa_map_io() is replacedon some devices for instance), you then
> > > use the VA address you specified and use __raw_{read,write}[b,w,l](). So
> > > use __raw_{read,write}[b,w,l]() on drivers specific for certain device
> > > and use {read,write}[b,w,l]() on ioremap()ed memory areas, aka. in
> > > common drivers.
> > 
> > Nope, this has nothing to do with static mappings vs. ioremap. The
> > difference is that read[b,w,l] do little endian accesses suitable for
> > PCI whereas the __raw_* functions do accesses in CPU endianess.
> > Peripherals integrated into a SoC like the SDMA engine here are
> > normally accessible in native endianess and thus need the __raw_*
> > functions. An external network controller (for example a LAN9117) will
> > probably need the non raw functions. Note that 99% of the arm users use
> > little endian only and thus cpu_to_le* is a noop, so both types will work
> > for most people.
> 
> Sorry, you got me here. Why do we have io{read,write} then btw. ? That's for 
> x86's io space, right ?

Looking at the implementation in lib/iomap.c it seems that
io{read,write} can do both PIO and MMIO accesses depending on the
address given to them.

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-28 17:20 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-16 11:07 [RFC] dmaengine: assorted patches and Freescale SDMA support Sascha Hauer
2010-08-16 11:07 ` [PATCH 1/3] dmaengine: add possibility for cyclic transfers Sascha Hauer
2010-08-16 11:56   ` Lothar Waßmann
2010-08-16 12:27     ` Linus Walleij
2010-08-16 12:32     ` Sascha Hauer
2010-08-16 12:22   ` Linus Walleij
2010-09-20 13:01   ` Sascha Hauer
2010-09-23 19:42     ` Dan Williams
2010-09-24  7:25       ` Sascha Hauer
2010-08-16 11:07 ` [PATCH 2/3] dmaengine: add wrapper functions for dmaengine Sascha Hauer
2010-08-23  7:17   ` Sascha Hauer
2010-09-23 19:53   ` Dan Williams
2010-09-24  7:25     ` Sascha Hauer
2010-09-24 15:45       ` Dan Williams
2010-08-16 11:07 ` [PATCH 3/3] dmaengine: Add Freescale i.MX SDMA support Sascha Hauer
2010-08-16 12:21   ` Linus Walleij
2010-08-16 14:15     ` Sascha Hauer
2010-08-17  4:36       ` Baruch Siach
2010-08-17  6:47         ` Sascha Hauer
2010-08-18  3:49           ` Alexei Babich
2010-08-18  4:41             ` Baruch Siach
2010-08-18 11:17           ` Philippe Rétornaz
2010-08-24  7:10     ` [PATCH 3/3 v3] " Sascha Hauer
2010-09-02 14:06     ` [PATCH 3/3] " Russell King - ARM Linux
2010-08-23 12:57   ` [PATCH 3/3 v2] " Sascha Hauer
2010-08-23 17:30     ` Linus Walleij
2010-08-24  6:58       ` Sascha Hauer
2010-08-23 17:48     ` Uwe Kleine-König
2010-08-28 15:18       ` Linus Walleij
2010-08-28 15:27         ` Marek Vasut
2010-08-28 16:18           ` Sascha Hauer
2010-08-28 16:30             ` Marek Vasut
2010-08-28 17:20               ` Sascha Hauer [this message]
2010-09-02 11:20               ` Russell King - ARM Linux
2010-08-29 12:35             ` Linus Walleij
2010-08-30 12:55               ` Sascha Hauer
2010-08-24  7:58     ` Lothar Waßmann
2010-08-24 15:01       ` Linus Walleij
2010-08-27 12:22   ` [PATCH 3/3 v3] " Sascha Hauer
2010-08-29 21:46     ` Marc Reilly

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=20100828172010.GJ1473@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).