
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