[U-Boot-Users] NAND: bad block in whole chip

Alemao xcarandiru at gmail.com
Tue Aug 12 19:28:13 CEST 2008


Hi all,

Im trying to use my NAND flash at MPC8360E-RDK based board.
But it seems that the whole chip is bad blocked.
Dont know if Im missing something... below some outputs:

=> nand info

Device 0: NAND 64MiB 3,3V 8-bit, sector size 16 KiB

=> nand bad
  00000000
  00004000
     .
     .
     .
  03ff4000
  03ff8000
  03ffc000
=> nand erase clean

NAND erase: device 0 whole chip
Skipping bad block at  0x00000000
Skipping bad block at  0x00004000
             .
             .
             .
Skipping bad block at  0x03ff8000
Skipping bad block at  0x03ffc000

OK
=>

I read that any block that contains bytes != 0xff in the OOB is
marked as "factory bad" block.

At nand_block_bad() function (drivers/nand/nand_base.c) I saw the
implementation of the statment above.

---
this->cmdfunc (mtd, NAND_CMD_READOOB, this->badblockpos, page);
		
if (this->read_byte(mtd) != 0xff) res = 1;
---


So I did some dumps in NAND:


=> nand dump 0x00004000
Page 0x00004000 dump:
             .
             .
             .
OOB:
        00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00

=> nand dump 0x03ff8000
Page 03ff8000 dump:
             .
             .
             .
OOB:
        81 81 81 01 81 81 81 81
        81 81 81 81 81 81 81 81


All dumps had OOB != 0xff

I also tried to write only 1 byte... no success:

=> tftpboot 0x02000000 kernel_blob.img
=> nand write.jffs2 0x02000000 0x0 0x1
   .
   .
   .
Bad block at 0x2010000 in erase block from 0x2010000 will be skipped
writing NAND page at offset 0x2014000 failed
Data did not fit into device, due to bad blocks
 1 bytes written: ERROR
=>


Any help/suggestions welcome.


Im using U-Boot-1.1.4 with NAND and FSL_UPM drivers from U-Boot-1.3.3

Cheers,

--
Alemao




More information about the U-Boot mailing list