[U-Boot-Users] Re: IDE interface on PPC has endian issue

Gregg gnemas at gmail.com
Tue Nov 15 23:56:35 CET 2005


Frank <frannk_m1 <at> yahoo.com> writes:

> 
> I had the same problem. It turns the idiot hardware engineer
> decided he would do byte swapping in hardware without telling
> me. To get around it, I just made the byte swapping code a noop
> (no byte swaping) and it worked. 

Doing an endian swap every place in cmd_ide.c where it is reading the data
register seems to have fixed the problem. I can now see the partitions on the
disk and load a file from it. I don't understand why the endianness is different
from what the u-boot code expects though, given how the data bits are connected
to the peripheral bus:

CF D0..D15 => PPC D15..D0

D15 is lsb on PPC 16-bit mode bus. It is as if the u-boot code expects

CF D0..D7 => PPC D7..D0
CF D8..D15 => PPC D15..D8

Thanks,

Gregg






More information about the U-Boot mailing list