提交 0e3fa01a 编写于 作者: J John Schmoller 提交者: Stefan Roese

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: NJohn Schmoller <jschmoller@xes-inc.com>
Signed-off-by: NPeter Tyser <ptyser@xes-inc.com>
Signed-off-by: NStefan Roese <sr@denx.de>
上级 bfc7bea6
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册