From: Alexander Sverdlin <[email protected]> In cases where phys_addr_t/phys_size_t is being printed, it's possible to use tiny-printf-friendly %pap instead of %llx. For instance, in SPL, with tiny-printf:
Before the patch: fdtdec_setup_memory_banksize: DRAM Bank #0: start = 0xx, size = 0xx After the patch: fdtdec_setup_memory_banksize: DRAM Bank #0: start = 80000000, size = 40000000 Signed-off-by: Alexander Sverdlin <[email protected]> --- lib/fdtdec.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 3779076377f..fb3375ea157 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -1077,8 +1077,7 @@ int fdtdec_setup_mem_size_base(void) gd->ram_size = (phys_size_t)(res.end - res.start + 1); gd->ram_base = (unsigned long)res.start; - debug("%s: Initial DRAM size %llx\n", __func__, - (unsigned long long)gd->ram_size); + debug("%s: Initial DRAM size %pap\n", __func__, &gd->ram_size); return 0; } @@ -1129,10 +1128,10 @@ int fdtdec_setup_memory_banksize(void) gd->bd->bi_dram[bank].size = (phys_size_t)(res.end - res.start + 1); - debug("%s: DRAM Bank #%d: start = 0x%llx, size = 0x%llx\n", + debug("%s: DRAM Bank #%d: start = %pap, size = %pap\n", __func__, bank, - (unsigned long long)gd->bd->bi_dram[bank].start, - (unsigned long long)gd->bd->bi_dram[bank].size); + &gd->bd->bi_dram[bank].start, + &gd->bd->bi_dram[bank].size); } return 0; -- 2.52.0

