summaryrefslogtreecommitdiff
path: root/common/fdt_support.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2011-09-17 06:48:58 +0000
committerWolfgang Denk <wd@denx.de>2011-10-17 23:56:59 +0200
commit925493582cc6e0760df813a9897464c77d5c7b25 (patch)
treef7553c24f068c0c18601b1e6d6abf8ed8525b7b8 /common/fdt_support.c
parentc861fbf74784fdd27a5a73dec1f5c37e1bb7297e (diff)
downloadu-boot-imx-925493582cc6e0760df813a9897464c77d5c7b25.zip
u-boot-imx-925493582cc6e0760df813a9897464c77d5c7b25.tar.gz
u-boot-imx-925493582cc6e0760df813a9897464c77d5c7b25.tar.bz2
sandbox: Use uintptr_t for 32/64-bit compatibility
This fixes a problems when building on some 64-bit machines. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/fdt_support.c')
-rw-r--r--common/fdt_support.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/fdt_support.c b/common/fdt_support.c
index abf6d53..e0d3fe3 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -495,7 +495,7 @@ int fdt_resize(void *blob)
total = fdt_num_mem_rsv(blob);
for (i = 0; i < total; i++) {
fdt_get_mem_rsv(blob, i, &addr, &size);
- if (addr == (uint64_t)(u32)blob) {
+ if (addr == (uintptr_t)blob) {
fdt_del_mem_rsv(blob, i);
break;
}
@@ -511,14 +511,14 @@ int fdt_resize(void *blob)
fdt_size_dt_strings(blob) + 5 * sizeof(struct fdt_reserve_entry);
/* Make it so the fdt ends on a page boundary */
- actualsize = ALIGN(actualsize + ((uint)blob & 0xfff), 0x1000);
- actualsize = actualsize - ((uint)blob & 0xfff);
+ actualsize = ALIGN(actualsize + ((uintptr_t)blob & 0xfff), 0x1000);
+ actualsize = actualsize - ((uintptr_t)blob & 0xfff);
/* Change the fdt header to reflect the correct size */
fdt_set_totalsize(blob, actualsize);
/* Add the new reservation */
- ret = fdt_add_mem_rsv(blob, (uint)blob, actualsize);
+ ret = fdt_add_mem_rsv(blob, (uintptr_t)blob, actualsize);
if (ret < 0)
return ret;