Hi Vivek,

Just to clarify these comments:

> It would be a lot easier if you modified the application to work on big-endian
> and little-endian.  Just look through the code in places where the endian
> matters, and add cpu_to_be32() and be32_to_cpu() (or similar functions).

When you are dealing with a driver, register accesses need to be
in a specific format. The MPC8349EA has some of its registers
in big-endian format, and others in little-endian format.
Regardless of the mode you operate your processor, you will
*have* to use the correct byte-swap functions.

> The only time this will be real problem is with DMA, since on 83xx you cannot
> modify the data during a DMA transfer.
> 

DMA would be used to move a block of data, not to manipulate
a register. If encode/decode functions are used to move blocks
of data, then the data is in byte-stream format, which does
not change when the endian-order of the processor changes.
Each byte occurs in the same order.

You mention you are trying to re-use an existing code base.
Keep in mind that just because the old code works, doesn't mean it
is good code. If the code was not written to be endian-neutral,
then it wasn't portable in the first place, so should be
corrected.

Cheers,
Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to