mtd: pxa3xx_nand: Fix initial controller configuration
[oweals/u-boot.git] / lib / fdtdec.c
index a208589c48aea777fcb7e57e6924d21009626f3d..bf5e0f6a57c0d25ca75efeac63d70ea963b3958e 100644 (file)
@@ -11,7 +11,6 @@
 #include <errno.h>
 #include <fdtdec.h>
 #include <fdt_support.h>
-#include <inttypes.h>
 #include <linux/libfdt.h>
 #include <serial.h>
 #include <asm/sections.h>
@@ -1182,10 +1181,8 @@ int fdtdec_setup_mem_size_base(void)
 
 #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);
@@ -1450,13 +1447,12 @@ int fdtdec_decode_ram_size(const void *blob, const char *area, int board_id,
                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;
                        }
                }
@@ -1466,7 +1462,7 @@ int fdtdec_decode_ram_size(const void *blob, const char *area, int board_id,
                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;