We are working with Monta Vista Linux with TI-Davinci platform.
Previously we were using TI LSP release of 1.20 and now we have migrated to LSP 
1.30. 
After migration to 1.30 we are facing issue of NAND bad block erase.
>From logs we can see almost all blocks are getting marked as bad blocks.
Then I tried to trace code to figure out the issue.
I found following changes…
1.    Board-evm.c :-
a.     some members are added to nand data-structure and masks of cle and ale 
initialized here
b.   
Cle mask changed to 0x08 from 0x0a which was macro in nand-davinci.c
previous version(suspect of problem tried change of 0x0a but not
working)
c.    Ecc mode changed to NAND_ECC_HW3_512 (but previous one also using 1-bit 
ecc only so may not be the
 problem)
d.    Instead of 1 there are 2 NAND resources (verified and may not be a 
problem)

2.    Nand_davinci.c, nand_base.c :-
a.    Virtual address related access methods changed(may not be a problem).
b.    Code contains multiple chips support. (but it has been verified that 
correct base addresses are getting used)
c.    ECC modes added and hence num of ecc bytes getting changed.

Considering
above cases I tried to trace behavior of code and found that execution
of this one is almost similar to previous one.
But still call to following method in Create_bbt [nand_bbt.c] gives wrong 
buffer data.

    ret = mtd->read_oob(mtd, from + j * mtd->oobblock, mtd->oobsize, &retlen, 
buf);

Thus check_short_pattern (buf, bd) method fails to check it against 0xff and I 
get Bad Erase blocks error.

Code function trace
 (as per our initialization of structures )is as follows…
Nand_davinci_probe
-> nand_scan -> nand_default_bbt ->
nand_scan_bbt(largepage_memorybased) -> nand_memory_bbt ->
create_bbt

If I boot through previous version on same board everything related to NAND 
works fine.
So anybody here to have faced this problem...

Omkar



      Yahoo! recommends that you upgrade to the new and safer Internet Explorer 
8. http://downloads.yahoo.com/in/internetexplorer/
_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to