* Re: DT and endianness
[not found] ` <4DD38BFA.7090904-l0cyMroinI0@public.gmane.org>
@ 2011-05-18 15:56 ` Grant Likely
0 siblings, 0 replies; only message in thread
From: Grant Likely @ 2011-05-18 15:56 UTC (permalink / raw)
To: Rajendra Nayak, devicetree-discuss
On Wed, May 18, 2011 at 3:06 AM, Rajendra Nayak <rnayak-l0cyMroinI0@public.gmane.org> 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.
^ permalink raw reply [flat|nested] only message in thread