diff options
author | Simon Glass <sjg@chromium.org> | 2013-11-10 10:26:54 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2013-11-21 16:54:26 -0700 |
commit | 370b6c5c4d764192399a220095a2dd1054314147 (patch) | |
tree | d6685b3ea6bc93a27585952857cb70cec7545bd3 /lib | |
parent | 0eb2acee394b16dd734f5f48b2cbf2f22065d060 (diff) | |
download | u-boot-imx-370b6c5c4d764192399a220095a2dd1054314147.zip u-boot-imx-370b6c5c4d764192399a220095a2dd1054314147.tar.gz u-boot-imx-370b6c5c4d764192399a220095a2dd1054314147.tar.bz2 |
sandbox: Correct data sizes and printf() strings in fdtdec.c
There are a few wwrnings in this file when building for sandbox. Addresses
coming from the device tree need to be treated as ulong as elsewhere in
U-Boot and we must use map_sysmem() to convert to a pointer when needed.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Hung-ying Tyan <tyanh@chromium.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fdtdec.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 51fa868..207314f 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -86,10 +86,10 @@ fdt_addr_t fdtdec_get_addr_size(const void *blob, int node, size = (fdt_size_t *)((char *)cell + sizeof(fdt_addr_t)); *sizep = fdt_size_to_cpu(*size); - debug("addr=%p, size=%p\n", (void *)addr, - (void *)*sizep); + debug("addr=%08lx, size=%08x\n", + (ulong)addr, *sizep); } else { - debug("%p\n", (void *)addr); + debug("%08lx\n", (ulong)addr); } return addr; } @@ -611,7 +611,7 @@ int fdtdec_decode_region(const void *blob, int node, if (!cell || (len != sizeof(fdt_addr_t) * 2)) return -1; - *ptrp = (void *)fdt_addr_to_cpu(*cell); + *ptrp = map_sysmem(fdt_addr_to_cpu(*cell), *size); *size = fdt_size_to_cpu(cell[1]); debug("%s: size=%zx\n", __func__, *size); return 0; |