summaryrefslogtreecommitdiff
path: root/arch/sh/lib/board.c
diff options
context:
space:
mode:
authorNobuhiro Iwamatsu <iwamatsu@nigauri.org>2010-10-26 20:23:53 +0900
committerNobuhiro Iwamatsu <iwamatsu@nigauri.org>2011-01-11 21:03:25 +0900
commitc4176c43a1699096039b745f110413790aa635b1 (patch)
tree30b5d59c0d0c401a9d14d4bd2c575dc7613b96cc /arch/sh/lib/board.c
parent6b7c0f5ebf767dec8cac0463867fbbeb5493eec3 (diff)
downloadu-boot-imx-c4176c43a1699096039b745f110413790aa635b1.zip
u-boot-imx-c4176c43a1699096039b745f110413790aa635b1.tar.gz
u-boot-imx-c4176c43a1699096039b745f110413790aa635b1.tar.bz2
sh: Add support showing KByte of flash memory size
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Diffstat (limited to 'arch/sh/lib/board.c')
-rw-r--r--arch/sh/lib/board.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/sh/lib/board.c b/arch/sh/lib/board.c
index 3d201b2..cdac382 100644
--- a/arch/sh/lib/board.c
+++ b/arch/sh/lib/board.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007,2008
+ * Copyright (C) 2007, 2008, 2010
* Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
*
* 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)
{
gd->bd->bi_flashsize = flash_init();
- printf("FLASH: %ldMB\n", gd->bd->bi_flashsize / (1024*1024));
+
+ if (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;
}