#include <errno.h>
#include <fdtdec.h>
#include <fdt_support.h>
-#include <inttypes.h>
#include <linux/libfdt.h>
#include <serial.h>
#include <asm/sections.h>
#if defined(CONFIG_NR_DRAM_BANKS)
-static int get_next_memory_node(const void *blob, int startoffset)
+static int get_next_memory_node(const void *blob, int mem)
{
- int mem = -1;
-
do {
mem = fdt_node_offset_by_prop_value(gd->fdt_blob, mem,
"device_type", "memory", 7);
if (auto_size) {
u64 new_size;
- debug("Auto-sizing %" PRIx64 ", size %" PRIx64 ": ",
- addr, size);
+ debug("Auto-sizing %llx, size %llx: ", addr, size);
new_size = get_ram_size((long *)(uintptr_t)addr, size);
if (new_size == size) {
debug("OK\n");
} else {
- debug("sized to %" PRIx64 "\n", new_size);
+ debug("sized to %llx\n", new_size);
size = new_size;
}
}
total_size += size;
}
- debug("Memory size %" PRIu64 "\n", total_size);
+ debug("Memory size %llu\n", total_size);
if (sizep)
*sizep = (phys_size_t)total_size;