public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] fix flinfo formatting for CFI flash
@ 2005-02-26 11:00 Ladislav Michl
  0 siblings, 0 replies; only message in thread
From: Ladislav Michl @ 2005-02-26 11:00 UTC (permalink / raw)
  To: u-boot

Hi,

flinfo is currently outputs this with CFG_FLASH_EMPTY_INFO defined:

Bank # 1: CFI conformant FLASH (16 x 16)  Size: 4 MB in 71 Sectors
 Erase timeout 16384 ms, write timeout 0 ms, buffer write timeout 1 ms, buffer size 1
  Sector Start Addresses:
 00000000  RO  00002000  RO  00004000  RO  00006000  RO  00008000  RO
 0000A000  RO  0000C000  RO  0000E000  RO  00010000  RO  00020000 ERO
 00030000 ERO  00040000      00050000      00060000      00070000
 00080000      00090000      000A0000      000B0000      000C0000

and this with CFG_FLASH_EMPTY_INFO undefined:

Bank # 1: CFI conformant FLASH (16 x 16)  Size: 4 MB in 71 Sectors
 Erase timeout 16384 ms, write timeout 0 ms, buffer write timeout 1 ms, buffer size 1
  Sector Start Addresses:
    00000000 (RO)   00002000 (RO)   00004000 (RO)   00006000 (RO)   00008000 (RO)
    0000A000 (RO)   0000C000 (RO)   0000E000 (RO)   00010000 (RO)   00020000 (RO)
    00030000 (RO)   00040000      00050000      00060000      00070000
    00080000      00090000      000A0000      000B0000      000C0000

Patch below fixes flinfo with CFG_FLASH_EMPTY_INFO undefined to print
informations as follows, making it similar with 1st case above

Bank # 1: CFI conformant FLASH (16 x 16)  Size: 4 MB in 71 Sectors
 Erase timeout 16384 ms, write timeout 0 ms, buffer write timeout 1 ms, buffer size 1
  Sector Start Addresses:
    00000000 RO   00002000 RO   00004000 RO   00006000 RO   00008000 RO
    0000A000 RO   0000C000 RO   0000E000 RO   00010000 RO   00020000 RO
    00030000      00040000      00050000      00060000      00070000
    00080000      00090000      000A0000      000B0000      000C0000

Similar fix is contained in Michael Bendzick's patch, Message-ID: 
<31ADFA827355984B9E2A161514595B561C34C2@lpdsrv04.logicpd.com> from
Fri, 14 Jan 2005 14:55:36 -0600, but I think this formatting is more
consistent with flash empty info version.

CHANGELOG:
* Patch by Ladislav Michl, 26 Feb 2005:
  - fix flinfo formatting for CFI flash

Index: drivers/cfi_flash.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/drivers/cfi_flash.c,v
retrieving revision 1.16
diff -u -r1.16 cfi_flash.c
--- drivers/cfi_flash.c	9 Jan 2005 17:12:33 -0000	1.16
+++ drivers/cfi_flash.c	26 Feb 2005 10:23:06 -0000
@@ -483,7 +482,7 @@
 		if ((i % 5) == 0)
 			printf ("\n   ");
 		printf (" %08lX%s",
-			info->start[i], info->protect[i] ? " (RO)  " : "     ");
+			info->start[i], info->protect[i] ? " RO  " : "     ");
 #endif
 	}
 	putc ('\n');

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-02-26 11:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-26 11:00 [U-Boot-Users] [PATCH] fix flinfo formatting for CFI flash Ladislav Michl

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