mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-26 20:37:16 +00:00
sh: Add support showing KByte of flash memory size
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
This commit is contained in:
parent
6b7c0f5ebf
commit
c4176c43a1
1 changed files with 6 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2007,2008
|
* Copyright (C) 2007, 2008, 2010
|
||||||
* Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
|
* Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
|
@ -46,7 +46,11 @@ unsigned long monitor_flash_len = CONFIG_SYS_MONITOR_LEN;
|
||||||
static int sh_flash_init(void)
|
static int sh_flash_init(void)
|
||||||
{
|
{
|
||||||
gd->bd->bi_flashsize = flash_init();
|
gd->bd->bi_flashsize = flash_init();
|
||||||
|
|
||||||
|
if (gd->bd->bi_flashsize >= (1024 * 1024))
|
||||||
printf("FLASH: %ldMB\n", gd->bd->bi_flashsize / (1024*1024));
|
printf("FLASH: %ldMB\n", gd->bd->bi_flashsize / (1024*1024));
|
||||||
|
else
|
||||||
|
printf("FLASH: %ldKB\n", gd->bd->bi_flashsize / 1024);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue