
23 Jul
2009
23 Jul
'09
11:25 p.m.
Wolfgang Denk wrote:
Dear Matthias Weisser,
In message 1248250473-12694-1-git-send-email-matthias.weisser@graf-syteco.de you wrote:
Volatile pointer usage caused lockup with arm-gcc 4.3.2 Using I/O accessor fixed that.
Hm...
- return *(volatile u32*)addr;
- return readl(addr);
On big-endian systems like PowerPC, readl() is a byte-swapping (little-endian) input function, which means that your patch changes the byte order of all I/O operations.
Yeah, that's why I left these alone when re-working this driver. I don't know what the correct approach is when using memory-mapped devices that could in theory go on the local bus of any processor. Most people I know would hook them up according to the native endianness.
regards, Ben