
27 Nov
2007
27 Nov
'07
8:11 p.m.
On Tue, Nov 27, 2007 at 09:13:06AM +0100, Martin Krause wrote:
Kumar Gala wrote on Monday, November 26, 2007 9:56 PM:
- addrcell = fdt_getprop(blob, 0, "#address-cells", NULL);
- if ((addrcell) && (*addrcell == 2)) {
for (i = 0; i <= 7; i++)
tmp[i] = (start >> ((7 - i) * 8)) & 0xff;
len = 8;
- } else {
for (i = 0; i <= 3; i++)
tmp[i] = (start >> ((3 - i) * 8)) & 0xff;
len = 4;
- }
Could this perhaps lead to endianess issues under some special circumstances?
I don't think so -- the device tree is defined as always being big-endian, regardless of the host endianness (multi-cell values would get a bit weird otherwise).
-Scott