[U-Boot] [PATCH 6/9] ram: stm32mp1: use PRIx64 macros for printing ram size

Philipp Tomsich philipp.tomsich at theobroma-systems.com
Thu Jul 26 13:59:48 UTC 2018


With the recent changes of the underlying types for the ram size, we
need to adjust the formatting.  Use PRIx64 to print the (now) u64
field.

Signed-off-by: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
---

 arch/arm/mach-stm32mp/dram_init.c   | 2 +-
 drivers/ram/stm32mp1/stm32mp1_ram.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-stm32mp/dram_init.c b/arch/arm/mach-stm32mp/dram_init.c
index 7688b3e..e4c6302 100644
--- a/arch/arm/mach-stm32mp/dram_init.c
+++ b/arch/arm/mach-stm32mp/dram_init.c
@@ -25,7 +25,7 @@ int dram_init(void)
 		debug("Cannot get RAM size: %d\n", ret);
 		return ret;
 	}
-	debug("RAM init base=%lx, size=%x\n", ram.base, ram.size);
+	debug("RAM init base=%lx, size=%" PRIx64 "\n", ram.base, ram.size);
 
 	gd->ram_size = ram.size;
 
diff --git a/drivers/ram/stm32mp1/stm32mp1_ram.c b/drivers/ram/stm32mp1/stm32mp1_ram.c
index bd497a3..faf78b2 100644
--- a/drivers/ram/stm32mp1/stm32mp1_ram.c
+++ b/drivers/ram/stm32mp1/stm32mp1_ram.c
@@ -130,7 +130,7 @@ static __maybe_unused int stm32mp1_ddr_setup(struct udevice *dev)
 
 	/* check memory access for all memory */
 	if (config.info.size != priv->info.size) {
-		printf("DDR invalid size : 0x%x, expected 0x%x\n",
+		printf("DDR invalid size : 0x%" PRIx64 ", expected 0x%x\n",
 		       priv->info.size, config.info.size);
 		return -EINVAL;
 	}
-- 
2.1.4



More information about the U-Boot mailing list