Signed-off-by: Nobuhiro Iwamatsu <[email protected]>
---
 arch/sh/lib/board.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/sh/lib/board.c b/arch/sh/lib/board.c
index a302fc2..bf3a5cc 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 <[email protected]>
  *
  * This program is free software; you can redistribute it and/or
@@ -46,7 +46,11 @@ static int sh_flash_init(void)
        DECLARE_GLOBAL_DATA_PTR;
 
        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;
 }
-- 
1.7.2.3

_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to