sandbox: Fix warnings due to 64-bit printf() strings

Now that we have inttypes.h, use it in a few more places to avoid compiler
warnings on sandbox when building on 64-bit machines.

Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/common/cmd_mem.c b/common/cmd_mem.c
index 0d50dcf..bcb3ee3 100644
--- a/common/cmd_mem.c
+++ b/common/cmd_mem.c
@@ -19,6 +19,7 @@
 #include <dataflash.h>
 #endif
 #include <hash.h>
+#include <inttypes.h>
 #include <watchdog.h>
 #include <asm/io.h>
 #include <linux/compiler.h>
@@ -338,7 +339,8 @@
 		if (word1 != word2) {
 			ulong offset = buf1 - base;
 #ifdef CONFIG_SYS_SUPPORT_64BIT_DATA
-			printf("%s at 0x%p (%#0*llx) != %s at 0x%p (%#0*llx)\n",
+			printf("%s at 0x%p (%#0*"PRIx64") != %s at 0x%p (%#0*"
+			       PRIx64 ")\n",
 			       type, (void *)(addr1 + offset), size, word1,
 			       type, (void *)(addr2 + offset), size, word2);
 #else
@@ -1146,7 +1148,7 @@
 			printf(" %08x", *((u32 *)ptr));
 #ifdef CONFIG_SYS_SUPPORT_64BIT_DATA
 		else if (size == 8)
-			printf(" %016llx", *((u64 *)ptr));
+			printf(" %016" PRIx64, *((u64 *)ptr));
 #endif
 		else if (size == 2)
 			printf(" %04x", *((u16 *)ptr));
diff --git a/common/fdt_support.c b/common/fdt_support.c
index ea42c63..127e17c 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <inttypes.h>
 #include <stdio_dev.h>
 #include <linux/ctype.h>
 #include <linux/types.h>
@@ -914,8 +915,6 @@
 	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 @@
 	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 @@
 
  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 @@
 
 	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;
 	}