Thread (1 message) 1 message, 1 author, 2011-05-18

Re: DT and endianness

From: Grant Likely <hidden>
Date: 2011-05-18 15:56:17

On Wed, May 18, 2011 at 3:06 AM, Rajendra Nayak [off-list ref] wrote:
Hey Grant,

I have been working over the last few days trying to
evaluate what part of the data files in OMAP can be moved
to Device tree. One basic issue I am stuck with trying
to extract data out of the device tree blob is the
endianess differences. The dtb file seems to be in
big-endian format while my kernel is compiled for
little-endian. I know this might be quite a common
issue with all ARM arch;s but I could not find any
obvious pointers on how to get around this.
Any help is greatly appreciated.
Yes, the dtb data is always big-endian encoded, regardless of
architecture.  This is on purpose so that any arch can parse any other
architecture's dtb format.  be32_to_cpu() is your friend.

g.

Thanks,
Rajendra


-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help