From 0e3fa01a636dcc015271329316a8b3b0bf66be2d Mon Sep 17 00:00:00 2001 From: John Schmoller Date: Wed, 29 Sep 2010 13:49:05 -0500 Subject: cfi_flash: Fix "Unknown FLASH" error message When a CFI flash chip could not be detected an error message similar to the following would be printed on bootup: FLASH: ## Unknown FLASH on Bank 1 - Size = 0x01000000 = 0 MB The printf incorrectly converted the flash size into megabytes. This patch fixes the printing of the flash size in megabytes: FLASH: ## Unknown FLASH on Bank 1 - Size = 0x01000000 = 16 MB Signed-off-by: John Schmoller Signed-off-by: Peter Tyser Signed-off-by: Stefan Roese --- drivers/mtd/cfi_flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index 02dd27f..798902f 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -2033,7 +2033,7 @@ unsigned long flash_init (void) printf ("## Unknown FLASH on Bank %d " "- Size = 0x%08lx = %ld MB\n", i+1, flash_info[i].size, - flash_info[i].size << 20); + flash_info[i].size >> 20); #endif /* CONFIG_SYS_FLASH_QUIET_TEST */ } #ifdef CONFIG_SYS_FLASH_PROTECTION -- cgit v1.1