DT and endianness
Grant Likely
grant.likely at secretlab.ca
Thu May 19 01:56:17 EST 2011
On Wed, May 18, 2011 at 3:06 AM, Rajendra Nayak <rnayak at ti.com> 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.
More information about the devicetree-discuss
mailing list