MPC5200 PCI byte-swapping

Mark Chambers markc at
Fri Dec 31 07:35:00 EST 2004

I've just realized that the 5200 does byte-lane swapping
on all PCI accesses.  That is, if you write a 32 bit word
0x12345678, 0x12 will go out on byte 0, 0x34 on byte 1,
etc.  Unfortunately, my target, a T.I. DM642, does not
do this, so I've got a big/little endian mismatch.  A couple
of questions if anybody knows:

- Do all MPC8xxx processors do this - byte swap on
all PCI accesses, not just configuration space?

- Is there an elegant (simple) way to re-swap the bytes?
It's not a big problem really, but if there were a way to 
set LE mode on a particular page or something like that
it might be worth it.

Mark Chambers

More information about the Linuxppc-embedded mailing list