public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] cfi_flash: Fix "Unknown FLASH" error message
@ 2010-09-29 18:49 Peter Tyser
  2010-10-12  7:00 ` Stefan Roese
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Tyser @ 2010-09-29 18:49 UTC (permalink / raw)
  To: u-boot

From: John Schmoller <jschmoller@xes-inc.com>

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>
---
 drivers/mtd/cfi_flash.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] cfi_flash: Fix "Unknown FLASH" error message
  2010-09-29 18:49 [U-Boot] [PATCH] cfi_flash: Fix "Unknown FLASH" error message Peter Tyser
@ 2010-10-12  7:00 ` Stefan Roese
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Roese @ 2010-10-12  7:00 UTC (permalink / raw)
  To: u-boot

On Wednesday 29 September 2010 20:49:05 Peter Tyser wrote:
> From: John Schmoller <jschmoller@xes-inc.com>
> 
> 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

Applied to u-boot-cfi-flash/master. Thanks.
 
Cheers,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-10-12  7:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-29 18:49 [U-Boot] [PATCH] cfi_flash: Fix "Unknown FLASH" error message Peter Tyser
2010-10-12  7:00 ` Stefan Roese

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox