summaryrefslogtreecommitdiff
path: root/common/fdt_support.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2011-08-19 16:20:19 -0600
committerSimon Glass <sjg@chromium.org>2011-09-19 13:48:11 -0700
commit85bd05f824ae6ae0328eebd85cddd14842a7f2db (patch)
treea7d5f55812b95d819711f12002858604837c8e0b /common/fdt_support.c
parent6dd131fb8562d016e400093428f7a118a5954f27 (diff)
fdt_support: Use uintptr_t for 32/64-bit compatibility
This fixes problems in these files when building on 64-bit machines. BUG=chromium-os:19353 TEST=build for Seaboard Change-Id: Ib013db127505b326436ab4f650ce72e40963e208 Reviewed-on: http://gerrit.chromium.org/gerrit/7644 Reviewed-by: Anton Staaf <robotboy@chromium.org> Tested-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 84a8608691..0795820c01 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;