]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
cfi_flash: Fix "Unknown FLASH" error message
authorJohn Schmoller <jschmoller@xes-inc.com>
Wed, 29 Sep 2010 18:49:05 +0000 (13:49 -0500)
committerStefan Roese <sr@denx.de>
Tue, 12 Oct 2010 06:59:15 +0000 (08:59 +0200)
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 <jschmoller@xes-inc.com>
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Stefan Roese <sr@denx.de>
drivers/mtd/cfi_flash.c

index 02dd27ffb1f9154305bae578682cb08af4f26925..798902f337698d9e54dad633dcc134481fa2069e 100644 (file)
@@ -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