[U-Boot-Users] IDE access swaps the bytes.
wd at denx.de
Thu Dec 2 22:49:03 CET 2004
In message <OF3F292F76.1C02E690-ON88256F5E.006658A6-88256F5E.006658AA at Cyclades.com> you wrote:
> I am using the u-boot with a MPC855T based board, and
> I am trying to boot from a compact flash by using the diskboot command.
I'm sorry, but my crystal ball is in dire need of an ectoplasmic up-
grade - in it's current state I am unable to see how your CF card is
attached to the system - is it through the PCMCIA controller, or
directly on the bus, or what?
> After debugging the code, I found out that the u-boot does
> not detect a DOS partition in the compact flash because
> the bytes are swapped when data is read from the IDE.
This is something that is specific to your hardware, then. It works
fine on the systems we have here.
> As the processor is big-endian, I supposed the u-boot
> would automatically fix this swapping problem, though I
> could not understand how. The IDE interface is set in
By use of appropriate access macros?
> set a "define" to fix this swapping problem, or if I should
> change the code (cmd_ide.c, I guess) using #ifdef <my platform>.
Don't change the code as long as you don't understand what's going
on. As mentioned before: the current code is working fine on several
systems with both big- and little-endian architectures.
> Could anyone please explain this to me?
Without studying the schematics of your board? That's not exactly a
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Without facts, the decision cannot be made logically. You must rely
on your human intuition.
-- Spock, "Assignment: Earth", stardate unknown
More information about the U-Boot