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

Linus Walleij linus.ml.walleij at gmail.com
Thu Nov 12 03:43:43 EST 2009


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 sent a patch you can slam on.

Linus Walleij



More information about the linux-arm-kernel mailing list