[alsa-devel] [PATCH 1/2] ASoC: p1022ds: fix incorrect referencing of device tree properties
timur at freescale.com
Thu Jun 9 00:27:01 CEST 2011
Steve Calfee wrote:
>> Device tree integer properties are encoded in big-endian format, but some of
>> > the Freescale ASoC drivers were assuming that the host is in big-endian format
>> > as well. Although this is true, it's better to use endian-safe accessors.
> Hi Timur,
> Can this be true?
Yes, it's true. When the device tree compiler compiles a property that looks
fsl,ssi-fifo-depth = <15>;
It writes the following bytes into the dtb:
00 00 00 0f
> I would assume a software constructed data structure would be in
> host-endian mode.
I wouldn't assume that at all. The device tree format is a defined binary
format. It makes sense that the endianness of multi-byte integers is defined.
Linux kernel developer at Freescale
More information about the Alsa-devel