]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
Merge branch 'sandbox' of git://git.denx.de/u-boot-x86
authorTom Rini <trini@ti.com>
Thu, 4 Dec 2014 14:24:05 +0000 (09:24 -0500)
committerTom Rini <trini@ti.com>
Thu, 4 Dec 2014 14:24:05 +0000 (09:24 -0500)
1  2 
common/fdt_support.c

diff --combined common/fdt_support.c
index 6254e342fd26aa3ad78f3d2160f37c6191ff4503,127e17c114310fa0b5fbbd12a4968f510a3c1b9a..8266bca7d6489a2ca8fb6f1015064184b137d2dd
@@@ -8,6 -8,7 +8,7 @@@
   */
  
  #include <common.h>
+ #include <inttypes.h>
  #include <stdio_dev.h>
  #include <linux/ctype.h>
  #include <linux/types.h>
@@@ -370,22 -371,22 +371,22 @@@ static int fdt_pack_reg(const void *fdt
                        int n)
  {
        int i;
 -      int address_len = fdt_address_cells(fdt, 0);
 -      int size_len = fdt_size_cells(fdt, 0);
 +      int address_cells = fdt_address_cells(fdt, 0);
 +      int size_cells = fdt_size_cells(fdt, 0);
        char *p = buf;
  
        for (i = 0; i < n; i++) {
 -              if (address_len == 2)
 +              if (address_cells == 2)
                        *(fdt64_t *)p = cpu_to_fdt64(address[i]);
                else
                        *(fdt32_t *)p = cpu_to_fdt32(address[i]);
 -              p += address_len;
 +              p += 4 * address_cells;
  
 -              if (size_len == 2)
 +              if (size_cells == 2)
                        *(fdt64_t *)p = cpu_to_fdt64(size[i]);
                else
                        *(fdt32_t *)p = cpu_to_fdt32(size[i]);
 -              p += size_len;
 +              p += 4 * size_cells;
        }
  
        return p - (char *)buf;
@@@ -914,8 -915,6 +915,6 @@@ void fdt_del_node_and_alias(void *blob
        fdt_delprop(blob, off, alias);
  }
  
- #define PRu64 "%llx"
  /* Max address size we deal with */
  #define OF_MAX_ADDR_CELLS     4
  #define OF_BAD_ADDR   ((u64)-1)
@@@ -973,8 -972,8 +972,8 @@@ static u64 of_bus_default_map(fdt32_t *
        s  = of_read_number(range + na + pna, ns);
        da = of_read_number(addr, na);
  
-       debug("OF: default map, cp="PRu64", s="PRu64", da="PRu64"\n",
-           cp, s, da);
+       debug("OF: default map, cp=%" PRIu64 ", s=%" PRIu64
+             ", da=%" PRIu64 "\n", cp, s, da);
  
        if (da < cp || da >= (cp + s))
                return OF_BAD_ADDR;
@@@ -1052,7 -1051,7 +1051,7 @@@ static int of_translate_one(void * blob
  
   finish:
        of_dump_addr("OF: parent translation for:", addr, pna);
-       debug("OF: with offset: "PRu64"\n", offset);
+       debug("OF: with offset: %" PRIu64 "\n", offset);
  
        /* Translate it into parent bus space */
        return pbus->translate(addr, offset, pna);
@@@ -1381,9 -1380,9 +1380,9 @@@ int fdt_verify_alias_address(void *fdt
  
        dt_addr = fdt_translate_address(fdt, node, reg);
        if (addr != dt_addr) {
-               printf("Warning: U-Boot configured device %s at address %llx,\n"
-                      " but the device tree has it address %llx.\n",
-                      alias, addr, dt_addr);
+               printf("Warning: U-Boot configured device %s at address %"
+                      PRIx64 ",\n but the device tree has it address %"
+                      PRIx64 ".\n", alias, addr, dt_addr);
                return 0;
        }