Browse Source

fdt: Skip byteorder swap on big endian

pull/220/head
Marcus Comstedt 6 years ago
parent
commit
8ac2e518fe
  1. 5
      machine/fdt.c

5
machine/fdt.c

@ -9,9 +9,14 @@
static inline uint32_t bswap(uint32_t x)
{
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
uint32_t y = (x & 0x00FF00FF) << 8 | (x & 0xFF00FF00) >> 8;
uint32_t z = (y & 0x0000FFFF) << 16 | (y & 0xFFFF0000) >> 16;
return z;
#else
/* No need to swap on big endian */
return x;
#endif
}
static inline int isstring(char c)

Loading…
Cancel
Save