Recently removed io accessors

Peter Korsgaard jacmet at
Sat Oct 14 21:57:03 EST 2006

>>>>> "PM" == Paul Mackerras <paulus at> writes:


>> Endian register set to little endian (default at powerup):
RedBoot> x -b 0x8e000064 -2 -l 4
>> 8E000064: 4321 8765
RedBoot> x -b 0x8e000064 -4 -l 4
>> 8E000064: 43218765

PM> Which is neither big-endian nor little-endian, but something more
PM> like vax-endian (or pdp11-endian), but not exactly that either -
PM> vax-endian would be 65872143.  What a mess.

Yes :/

PM> Clearly the "big endian" bit on the chip doesn't actually switch
PM> between little-endian and big-endian at all, but just acts to
PM> invert the 0x2 bit of the address...


PM> So the two hardware bogosities taken together leave you with only
PM> one combination that is anything like usable.  I suggest that you
PM> code up a loop of readw (or equivalent) in the driver with a big
PM> comment explaining why you need to do it that way.

It doesn't have to be readw (16bit accesses). Enabling the BE mode and
using _outsl/_insl (32bit access with byteswap) works fine.

Let me repeat my question:
Could I get _outsl/_insl re-added to kernel/misc.S or do I have to
reimplement it somewhere else (platform file or smc911x.h)?

Bye, Peter Korsgaard

More information about the Linuxppc-dev mailing list