Skip to content
Snippets Groups Projects
Commit c4176c43 authored by Nobuhiro Iwamatsu's avatar Nobuhiro Iwamatsu
Browse files

sh: Add support showing KByte of flash memory size

parent 6b7c0f5e
No related branches found
No related tags found
No related merge requests found
/*
* 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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment