[PATCH] AT91RM9200 NAND support
Savin Zlobec
savin at epico.si
Tue Jun 20 06:49:50 EDT 2006
Thomas Gleixner wrote:
>On Tue, 2006-06-20 at 11:07 +0200, Savin Zlobec wrote:
>
>
>>I've put the kernel with latest mtd on my board and got the following:
>>
>>Nand is recognized as 'NAND device: Manufacturer ID: 0x98, Chip ID: 0x75
>>(Toshiba NAND 32MiB 3,3V 8-bit)',
>>should be 'NAND device: Manufacturer ID: 0xec, Chip ID: 0x75 (Samsung
>>NAND 32MiB 3,3V 8-bit)'.
>>
>>No bad blocks are detected at initial nand scan, but when running
>>flash_eraseall all blocks are found bad.
>>
>>
>
>Hmm. The interface has not changed, AFAICT. What version of
>flash_eraseall are you using and which commandline options ?
>
>Can you verify with the latest mtd-utils from
>
>http://git.infradead.org/?p=mtd-utils.git;a=summary
>
>
I did the following modifications to nand_base.c :
--- drivers/mtd/nand/nand_base.c.orig 2006-06-20 12:19:10.000000000 +0200
+++ drivers/mtd/nand/nand_base.c 2006-06-20 12:18:51.000000000 +0200
@@ -1134,10 +1134,6 @@
else
buf += ops->ooblen;
- readlen -= ops->ooblen;
- if (!readlen)
- break;
-
if (!(chip->options & NAND_NO_READRDY)) {
/*
* Apply delay or wait for ready/busy pin. Do this
@@ -1151,6 +1147,10 @@
nand_wait_ready(mtd);
}
+ readlen -= ops->ooblen;
+ if (!readlen)
+ break;
+
/* Increment page address */
realpage++;
And managed to erase the nand flash and mount JFFS2 on it, but writting
still
didn't work - got errors like :
Data CRC d507eb40 != calculated CRC 2e617dde for node at 00e4f700
The I put a call to nand_wait_ready at the top of nand_command function and
as far as I could test everything worked (exept that the flash is still
recognized
as Toshiba (0x98) not Samsung (0xec)).
It looks (to me) that there are still some parts of the code that should
wait for
nand to get ready before sending commands.
savin
More information about the linux-mtd
mailing list