Endianness versus too many byte swaps??

Charles Krinke ckrinke at istor.com
Tue Mar 6 02:02:43 EST 2007



You do understand that readl is in fact a call to in_le32() on ppc
(cf. include/asm-ppc/io.h).
 
The question now is, what endianness you would like in that register?

Regards
-- 
Stephane

Dear Stephane:

Your point is well made. I can see that readl is in fact a call to
in_le32. Maybe there is a more basic problem here. 

If I change the call to readl to a call to in_be32, things make sense
again. So, maybe I don't quite understand the endianness setup of this
Linux project.

I am told that we are running this ppc in big endian, so would this mean
that readl & writel should actually be resolving to in_be32/out_be32
respectively? Is there some other setup that may be wrong?


Charles



More information about the Linuxppc-embedded mailing list