FIX: [uboot] make fdt get value endian-safe on NB800

BugzId: 54033
This commit is contained in:
Viacheslav Volkov 2019-05-03 21:13:27 +02:00 committed by Moritz Rosenthal
parent 953573d5dd
commit b29105b37c
1 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ static int fdt_value_setenv(const void *nodep, int len, const char *var)
else if (len == 4) {
char buf[11];
sprintf(buf, "0x%08X", *(uint32_t *)nodep);
sprintf(buf, "0x%08X", fdt32_to_cpu(*(fdt32_t *)nodep));
setenv(var, buf);
} else if (len%4 == 0 && len <= 20) {
/* Needed to print things like sha1 hashes. */
@ -740,7 +740,7 @@ static int fdt_parse_prop(char * const *newval, int count, char *data, int *len)
cp = newp;
tmp = simple_strtoul(cp, &newp, 0);
*(__be32 *)data = __cpu_to_be32(tmp);
*(fdt32_t *)data = cpu_to_fdt32(tmp);
data += 4;
*len += 4;