drivers/rtc/rtc-pl031.c uses __raw_readl()?

Russell King - ARM Linux linux at arm.linux.org.uk
Fri Nov 13 18:26:37 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,
> so that if you put your ARM in BE mode or synthesize this PrimeCell
> on PPC, it will not work. PrimeCell registers are always LE I believe.
> 
> Now none of that was exactly obvious so please correct me if I'm
> wrong!

I think it's a question for Catalin - unfortunately the AMBA specifications
(which I guess is where there's a definitive statement on the endianness
for APB peripherals) is only available to registered users via the ARM
website.



More information about the linux-arm-kernel mailing list