mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-13 14:06:07 -04:00
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>
This commit is contained in:
parent
c861fbf747
commit
925493582c
@ -937,7 +937,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||||||
if (readback != val) {
|
if (readback != val) {
|
||||||
printf ("\nMem error @ 0x%08X: "
|
printf ("\nMem error @ 0x%08X: "
|
||||||
"found %08lX, expected %08lX\n",
|
"found %08lX, expected %08lX\n",
|
||||||
(uint)addr, readback, val);
|
(uint)(uintptr_t)addr, readback, val);
|
||||||
errs++;
|
errs++;
|
||||||
if (ctrlc()) {
|
if (ctrlc()) {
|
||||||
putc ('\n');
|
putc ('\n');
|
||||||
|
@ -495,7 +495,7 @@ int fdt_resize(void *blob)
|
|||||||
total = fdt_num_mem_rsv(blob);
|
total = fdt_num_mem_rsv(blob);
|
||||||
for (i = 0; i < total; i++) {
|
for (i = 0; i < total; i++) {
|
||||||
fdt_get_mem_rsv(blob, i, &addr, &size);
|
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);
|
fdt_del_mem_rsv(blob, i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -511,14 +511,14 @@ int fdt_resize(void *blob)
|
|||||||
fdt_size_dt_strings(blob) + 5 * sizeof(struct fdt_reserve_entry);
|
fdt_size_dt_strings(blob) + 5 * sizeof(struct fdt_reserve_entry);
|
||||||
|
|
||||||
/* Make it so the fdt ends on a page boundary */
|
/* Make it so the fdt ends on a page boundary */
|
||||||
actualsize = ALIGN(actualsize + ((uint)blob & 0xfff), 0x1000);
|
actualsize = ALIGN(actualsize + ((uintptr_t)blob & 0xfff), 0x1000);
|
||||||
actualsize = actualsize - ((uint)blob & 0xfff);
|
actualsize = actualsize - ((uintptr_t)blob & 0xfff);
|
||||||
|
|
||||||
/* Change the fdt header to reflect the correct size */
|
/* Change the fdt header to reflect the correct size */
|
||||||
fdt_set_totalsize(blob, actualsize);
|
fdt_set_totalsize(blob, actualsize);
|
||||||
|
|
||||||
/* Add the new reservation */
|
/* 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)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user