diff options
author | Becky Bruce <becky.bruce@freescale.com> | 2008-06-10 01:37:16 (GMT) |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-06-11 22:54:53 (GMT) |
commit | b57ca3e128cc10a133ba79bc7ec3e7b50e7c8fbe (patch) | |
tree | 247a1f2b1ea4c024206b4ec02a71604cd5ee40b3 /common/cmd_bdinfo.c | |
parent | b77cddc7b52acd4ed78830ac681a398dd3053938 (diff) | |
download | u-boot-fsl-qoriq-b57ca3e128cc10a133ba79bc7ec3e7b50e7c8fbe.tar.xz |
Change bd/gd memsize/ram_size to be phys_size_t.
Currently, both are defined as an unsigned long, but
should be phys_size_t. This should result in no real change,
since phys_size_t is currently an unsigned long for all the
default configs. Also add print_lnum to cmd_bdinfo to deal
with the potentially wider memsize.
Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
Diffstat (limited to 'common/cmd_bdinfo.c')
-rw-r--r-- | common/cmd_bdinfo.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index 731c1d2..5bb39d8 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -33,6 +33,7 @@ DECLARE_GLOBAL_DATA_PTR; static void print_num(const char *, ulong); #ifndef CONFIG_ARM /* PowerPC and other */ +static void print_lnum(const char *, u64); #ifdef CONFIG_PPC static void print_str(const char *, const char *); @@ -47,7 +48,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) print_num ("bd address", (ulong)bd ); #endif print_num ("memstart", bd->bi_memstart ); - print_num ("memsize", bd->bi_memsize ); + print_lnum ("memsize", bd->bi_memsize ); print_num ("flashstart", bd->bi_flashstart ); print_num ("flashsize", bd->bi_flashsize ); print_num ("flashoffset", bd->bi_flashoffset ); @@ -132,7 +133,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) bd_t *bd = gd->bd; print_num ("memstart", (ulong)bd->bi_memstart); - print_num ("memsize", (ulong)bd->bi_memsize); + print_lnum ("memsize", (u64)bd->bi_memsize); print_num ("flashstart", (ulong)bd->bi_flashstart); print_num ("flashsize", (ulong)bd->bi_flashsize); print_num ("flashoffset", (ulong)bd->bi_flashoffset); @@ -158,7 +159,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) bd_t *bd = gd->bd; print_num ("mem start", (ulong)bd->bi_memstart); - print_num ("mem size", (ulong)bd->bi_memsize); + print_lnum ("mem size", (u64)bd->bi_memsize); print_num ("flash start", (ulong)bd->bi_flashstart); print_num ("flash size", (ulong)bd->bi_flashsize); print_num ("flash offset", (ulong)bd->bi_flashoffset); @@ -188,7 +189,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) int i; bd_t *bd = gd->bd; print_num ("mem start ", (ulong)bd->bi_memstart); - print_num ("mem size ", (ulong)bd->bi_memsize); + print_lnum ("mem size ", (u64)bd->bi_memsize); print_num ("flash start ", (ulong)bd->bi_flashstart); print_num ("flash size ", (ulong)bd->bi_flashsize); print_num ("flash offset ", (ulong)bd->bi_flashoffset); @@ -220,7 +221,7 @@ int do_bdinfo(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) print_num("bd address ", (ulong) bd); #endif print_num("memstart ", bd->bi_memstart); - print_num("memsize ", bd->bi_memsize); + print_lnum("memsize ", bd->bi_memsize); print_num("flashstart ", bd->bi_flashstart); print_num("CFG_MONITOR_BASE ", CFG_MONITOR_BASE); print_num("CFG_ENV_ADDR ", CFG_ENV_ADDR); @@ -257,7 +258,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) char buf[32]; print_num ("memstart", (ulong)bd->bi_memstart); - print_num ("memsize", (ulong)bd->bi_memsize); + print_lnum ("memsize", (u64)bd->bi_memsize); print_num ("flashstart", (ulong)bd->bi_flashstart); print_num ("flashsize", (ulong)bd->bi_flashsize); print_num ("flashoffset", (ulong)bd->bi_flashoffset); @@ -328,7 +329,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) print_num("boot_params", (ulong)bd->bi_boot_params); print_num("memstart", (ulong)bd->bi_memstart); - print_num("memsize", (ulong)bd->bi_memsize); + print_lnum("memsize", (u64)bd->bi_memsize); print_num("flashstart", (ulong)bd->bi_flashstart); print_num("flashsize", (ulong)bd->bi_flashsize); print_num("flashoffset", (ulong)bd->bi_flashoffset); @@ -352,7 +353,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) print_num ("boot_params", (ulong)bd->bi_boot_params); print_num ("memstart", (ulong)bd->bi_memstart); - print_num ("memsize", (ulong)bd->bi_memsize); + print_lnum ("memsize", (u64)bd->bi_memsize); print_num ("flashstart", (ulong)bd->bi_flashstart); print_num ("flashsize", (ulong)bd->bi_flashsize); print_num ("flashoffset", (ulong)bd->bi_flashoffset); @@ -408,6 +409,13 @@ static void print_num(const char *name, ulong value) printf ("%-12s= 0x%08lX\n", name, value); } +#ifndef CONFIG_ARM +static void print_lnum(const char *name, u64 value) +{ + printf ("%-12s= 0x%.8llX\n", name, value); +} +#endif + #if defined(CONFIG_PPC) || defined(CONFIG_M68K) static void print_str(const char *name, const char *str) { |