[openfirmware] r1298 - dev/olpc/cafenand
svn at openfirmware.info
svn at openfirmware.info
Thu Aug 13 06:49:18 CEST 2009
Author: wmb
Date: 2009-08-13 06:49:18 +0200 (Thu, 13 Aug 2009)
New Revision: 1298
Modified:
dev/olpc/cafenand/badblock.fth
Log:
OLPC trac 9473 - added a count of bad blocks to the /nandflash selftest method.
Modified: dev/olpc/cafenand/badblock.fth
===================================================================
--- dev/olpc/cafenand/badblock.fth 2009-08-13 04:48:12 UTC (rev 1297)
+++ dev/olpc/cafenand/badblock.fth 2009-08-13 04:49:18 UTC (rev 1298)
@@ -396,12 +396,20 @@
\ Clear the device but honor the existing bad block table
: wipe ( -- ) ['] drop ['] .bn ['] drop (wipe) ;
+0 instance value #bad
: show-bbt ( -- )
+ 0 to #bad
total-pages 0 ?do
- i block-bad? if ." Bad block" i .page-byte cr then
+ i block-bad? if
+ ." Bad block" i .page-byte cr
+ #bad 1+ to #bad
+ then
pages/eblock +loop
bbt1 if ." BBTable 1" bbt1 .page-byte cr then
bbt0 if ." BBTable 0" bbt0 .page-byte cr then
+
+ cr
+ ." Total # of bad blocks: " #bad .d cr
;
headers
More information about the openfirmware
mailing list