drivers/rtc/rtc-pl031.c uses __raw_readl()?
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Tue Nov 17 05:02:56 EST 2009
On Thu, Nov 12, 2009 at 09:43:43AM +0100, Linus Walleij wrote:
> 2009/11/11 Linus Walleij <linus.ml.walleij at gmail.com>:
>
> > Is there some special reason as to why drivers/rtc/rtc-pl031.c uses
> > the __raw_[read|write]l() macro instead of plain [read|write]l()?
>
> Reading the macro definitions I come to the conclusion that readl()
> is always little-endian and __raw_readl() is the machine endianness,
Actually the readl part is not necessarily true I think.
At least arch/arm/mach-bcmring/include/mach/io.h has:
/* Do not enable mem_pci for a big endian arm architecture or unexpected byteswaps will */
/* happen in readw/writew etc. */
#define readb(c) __raw_readb(c)
...
But maybe this is a bug in mach-bcmring?! Or a work-around of drivers
using readb et al in wrong sitatations?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
More information about the linux-arm-kernel
mailing list