[U-Boot-Users] Re: Testing rewrite of NAND code?

Hoda hskaraki at hotmail.com
Wed Sep 28 10:21:57 CEST 2005


Hi again:

This more of a note than a question. I have this issue that I also had with the 
kernel: 
Yet for me to find out, reading (particularly out of band data) doesn't work 
properly unless an empty MTD_NAND_READ0 command is sent after the intial one:

this->cmdfunc (mtd, MTD_NAND_READX, column, page);
==> this->cmdfunc (mtd, MTD_NAND_READ0, -1, -1); <==

I've inserted this second line after all the MTD_NAND_READX commands
except for MTD_NAND_READID

Without it, what would happen is that it would start reading the ecccode a few 
bytes before, hence it won't match with the calculated ecccode. Also the 
blocks, where I wrote to the first page, would be listed as bad when they're 
not; understandable since again it is reading the wrong bytes.
-------------------------------------------------------------------------------
INCA-IP-ROM # nand write 80400000 0 1000

NAND write: device 0 offset 0, size 4096 ... nand_write_ecc: to = 0x00000000, 
len = 4096
 4096 bytes written: OK
INCA-IP-ROM # nand read 80800000 0 1000

NAND read: device 0 offset 0, size 4096 ... nand_read_ecc: from = 0x00000000, 
len = 4096
ECC bytes are: 96  9a  6b  9a  9a  97  66  a6  9b  aa  96  97  3c  f0  3f  f3  
3f  cf  a9  a6  9b  59  59  57
ECC bytes are: ff  ff  ff  ff  ff  ff  ff  ff  ff  ff  33  30  33  f0  cc  f3  
03  ff  ff  03  cf  33  55  65
nand_read_ecc: Failed ECC read, page 0x00000001
nand_read_ecc: Failed ECC read, page 0x00000001
nand_read_ecc: Failed ECC read, page 0x00000001
 4096 bytes read: ERROR
--------------------------------------------------------------------------------
When I do a nand dump, the oob data looks like this:

OOB:
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff
        33 30 33 f0 cc f3 03 ff
        ff 03 cf 33 55 65 5b 59
        5a a7 69 aa 5b 5a aa 6b


I am testing Large page NAND ST 01GW3B on the INCA-IP board.

This extra READ cmd was there in the old cmd_nand.c file in the NanD_ReadBuf 
function.






More information about the U-Boot mailing list