]> git.baikalelectronics.ru Git - uboot.git/commit
cmd: bdinfo: cleanup phys_addr_t output
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Tue, 28 Jul 2020 15:56:33 +0000 (17:56 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 5 Aug 2020 12:18:34 +0000 (08:18 -0400)
commit77e363019e312d016d89c40630988d1857624b74
treecb4b6edc8703db4a20bcf32babe0e369d3648b28
parent14634bd3ea80b8af13f51423e7c2b26156c6785a
cmd: bdinfo: cleanup phys_addr_t output

We currently print the memory size with at least 8 hexadecimal digits.
This creates a ragged output on 64 bit boards, e.g. on a Kendryte K210:

DRAM bank   = 0x0000000000000002
-> start    = 0x0000000080600000
-> size     = 0x0000000000200000
memstart    = 0x0000000000000000
memsize     = 0x00000000
flashstart  = 0x0000000000000000
flashsize   = 0x0000000000000000
flashoffset = 0x0000000000000000

All other numbers are printed with the number of digits needed for the type
ulong. So use this value as minimum number of digits (precision) for
printing physical addresses.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
cmd/bdinfo.c