* A question on ECC
@ 2003-04-14 0:18 Edward Lee \(이장원\)
2003-04-14 2:01 ` Earl Manning
0 siblings, 1 reply; 14+ messages in thread
From: Edward Lee \(이장원\) @ 2003-04-14 0:18 UTC (permalink / raw)
To: linux-mtd
Hello. I'm Edward Lee in Korea.
I'm using samsung NAND flash, with YAFFS on it..
But I'm having problems with ECC.
I wrote a file that's needed to use the flash chip with my board,
and here's a small part of code that defines the partitions.
static struct mtd_partition partition_info[] = {
{ name: "a",
offset: 0,
size: 32 * 512 },
{ name: "b",
offset: 16384,
size: 2 * 1024 * 1024 },
{ name: "c",
offset: 2113536,
size: 2 * 1024 * 1024 },
{ name: "d",
offset: 4210688,
size: 11 * 1024 * 1024 },
{ name: "e",
offset: 15745024,
size: 1032192 }
};
#define NUM_PARTITIONS 5
I'm using YAFFS on partitions "d" and "e".
But I can't stop recieving annoying kernel messages saying
"Reading data from NAND FLASH without ECC is not recommended".
On YAFFS's side, I set the option CONFIG_YAFFS_USE_NANDECC,
which I believe that asks the mtd NAND to do the ECC.
So, I would like to ask if any other settings are necessary in order to enable ECC.
(Probably something should be added to the stuff above?)
Well, that's all, and thanks for the great work.
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: A question on ECC 2003-04-14 0:18 A question on ECC Edward Lee \(이장원\) @ 2003-04-14 2:01 ` Earl Manning 2003-04-14 5:13 ` Edward Lee (???) 0 siblings, 1 reply; 14+ messages in thread From: Earl Manning @ 2003-04-14 2:01 UTC (permalink / raw) To: linux-mtd Hi Edward, I am using a similar chip with JFFS2. When you wrote the image, did you use the supplied utility 'nandwrite'? If you did, did you invoke it with the "--yaffs" option? I hope this helps, Earl Manning On Mon, 14 Apr 2003 09:18:09 +0900 Edward Lee \(ÀÌÀå¿ø\) <noshel@idis.co.kr> wrote: > Hello. I'm Edward Lee in Korea. > > I'm using samsung NAND flash, with YAFFS on it.. > But I'm having problems with ECC. > I wrote a file that's needed to use the flash chip with my board, > and here's a small part of code that defines the partitions. > > static struct mtd_partition partition_info[] = { > { name: "a", > offset: 0, > size: 32 * 512 }, > { name: "b", > offset: 16384, > size: 2 * 1024 * 1024 }, > { name: "c", > offset: 2113536, > size: 2 * 1024 * 1024 }, > { name: "d", > offset: 4210688, > size: 11 * 1024 * 1024 }, > { name: "e", > offset: 15745024, > size: 1032192 } > }; > #define NUM_PARTITIONS 5 > > I'm using YAFFS on partitions "d" and "e". > But I can't stop recieving annoying kernel messages saying > "Reading data from NAND FLASH without ECC is not recommended". > > On YAFFS's side, I set the option CONFIG_YAFFS_USE_NANDECC, > which I believe that asks the mtd NAND to do the ECC. > So, I would like to ask if any other settings are necessary in order to enable ECC. > (Probably something should be added to the stuff above?) > > Well, that's all, and thanks for the great work. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: A question on ECC 2003-04-14 2:01 ` Earl Manning @ 2003-04-14 5:13 ` Edward Lee (???) 2003-04-14 7:54 ` Thomas Gleixner 0 siblings, 1 reply; 14+ messages in thread From: Edward Lee (???) @ 2003-04-14 5:13 UTC (permalink / raw) To: Earl Manning; +Cc: linux-mtd Hi Earl, thanks for the help. I didn't use nandwrite, I wrote on the chip using plain stuff like 'cp' or 'tar', etc. (having a file system on my device, I couldn't find a reason to write files using other programs) ----- Original Message ----- From: "Earl Manning" <EManning@PRISMIQ.com> To: <linux-mtd@lists.infradead.org> Sent: Monday, April 14, 2003 11:01 AM Subject: Re: A question on ECC Hi Edward, I am using a similar chip with JFFS2. When you wrote the image, did you use the supplied utility 'nandwrite'? If you did, did you invoke it with the "--yaffs" option? I hope this helps, Earl Manning On Mon, 14 Apr 2003 09:18:09 +0900 Edward Lee \(ÀÌÀå¿ø\) <noshel@idis.co.kr> wrote: > Hello. I'm Edward Lee in Korea. > > I'm using samsung NAND flash, with YAFFS on it.. > But I'm having problems with ECC. > I wrote a file that's needed to use the flash chip with my board, > and here's a small part of code that defines the partitions. > > static struct mtd_partition partition_info[] = { > { name: "a", > offset: 0, > size: 32 * 512 }, > { name: "b", > offset: 16384, > size: 2 * 1024 * 1024 }, > { name: "c", > offset: 2113536, > size: 2 * 1024 * 1024 }, > { name: "d", > offset: 4210688, > size: 11 * 1024 * 1024 }, > { name: "e", > offset: 15745024, > size: 1032192 } > }; > #define NUM_PARTITIONS 5 > > I'm using YAFFS on partitions "d" and "e". > But I can't stop recieving annoying kernel messages saying > "Reading data from NAND FLASH without ECC is not recommended". > > On YAFFS's side, I set the option CONFIG_YAFFS_USE_NANDECC, > which I believe that asks the mtd NAND to do the ECC. > So, I would like to ask if any other settings are necessary in order to enable ECC. > (Probably something should be added to the stuff above?) > > Well, that's all, and thanks for the great work. ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: A question on ECC 2003-04-14 5:13 ` Edward Lee (???) @ 2003-04-14 7:54 ` Thomas Gleixner 2003-04-14 17:40 ` Edward J. Lee 0 siblings, 1 reply; 14+ messages in thread From: Thomas Gleixner @ 2003-04-14 7:54 UTC (permalink / raw) To: Edward Lee (???), Earl Manning; +Cc: linux-mtd On Monday 14 April 2003 07:13, Edward Lee (???) wrote: > Hi Earl, thanks for the help. > > I didn't use nandwrite, I wrote on the chip using plain stuff like 'cp' or > 'tar', etc. (having a file system on my device, I couldn't find a reason > to write files using other programs) nandwrite is just used to copy a filesystem image to a unformatted chip. If you have mounted the fs already, then nandwrite would be the wrong tool. These messages have a different reason. I assume that you followed the advice on yaffs list and you have enabled YAFFS_USE_NANDECC and disabled YAFFS_USE_OLD_MTD. Then I can only guess, that you did not select a ecc mode in your board driver code. <SNIP> /* 20 us command delay time */ this->chip_delay = 20; this->eccmode = NAND_ECC_SOFT; <SNIP> NAND_ECC_SOFT is the right choice, if you don't have a hardware ecc generator. If you have one, you must supply the neccecary functions to use it. -- Thomas ________________________________________________________________________ linutronix - competence in embedded & realtime linux http://www.linutronix.de mail: tglx@linutronix.de ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: A question on ECC 2003-04-14 7:54 ` Thomas Gleixner @ 2003-04-14 17:40 ` Edward J. Lee 2003-04-14 10:03 ` Gerhard Uttenthaler ` (2 more replies) 0 siblings, 3 replies; 14+ messages in thread From: Edward J. Lee @ 2003-04-14 17:40 UTC (permalink / raw) To: tglx; +Cc: linux-mtd Thomas Gleixner wrote: >On Monday 14 April 2003 07:13, Edward Lee (???) wrote: > > >>Hi Earl, thanks for the help. >> >>I didn't use nandwrite, I wrote on the chip using plain stuff like 'cp' or >>'tar', etc. (having a file system on my device, I couldn't find a reason >>to write files using other programs) >> >> >nandwrite is just used to copy a filesystem image to a unformatted chip. >If you have mounted the fs already, then nandwrite would be the wrong tool. > >These messages have a different reason. I assume that you followed the advice >on yaffs list and you have enabled YAFFS_USE_NANDECC and disabled >YAFFS_USE_OLD_MTD. > >Then I can only guess, that you did not select a ecc mode in your board driver >code. > ><SNIP> > /* 20 us command delay time */ > this->chip_delay = 20; > this->eccmode = NAND_ECC_SOFT; ><SNIP> > >NAND_ECC_SOFT is the right choice, if you don't have a hardware ecc generator. >If you have one, you must supply the neccecary functions to use it. > > > this->eccmode is indeed set to NAND_ECC_SOFT. I guess my case is kind of 'extra-tricky'. I just found out another weird thing, that the warning messages complaining '...without ECC...' do NOT appear when I'm 'writing' on the chip. Strange, eh. :'( ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: A question on ECC 2003-04-14 17:40 ` Edward J. Lee @ 2003-04-14 10:03 ` Gerhard Uttenthaler 2003-04-14 11:17 ` Thomas Gleixner 2003-04-14 11:25 ` Thomas Gleixner 2003-04-14 14:06 ` Earl Manning 2 siblings, 1 reply; 14+ messages in thread From: Gerhard Uttenthaler @ 2003-04-14 10:03 UTC (permalink / raw) To: linux-mtd Hi, Which eccmode is used seems to be set from the calling function of nand_read_ecc. I found: in nandwrite.c: struct nand_oobinfo jffs2_oobinfo = { useecc: 1, eccpos: { 0, 1, 2, 3, 6, 7} }; <SNIP> // force oob layout for jffs2 or yaffs ? if (forcejffs2 || forceyaffs) { struct nand_oobinfo *oobsel = forcejffs2 ? &jffs2_oobinfo : &yaffs_oobinfo; if (ioctl (fd, MEMSETOOBSEL, oobsel) != 0) { perror ("MEMSETOOBSEL"); close (fd); exit (1); } } Here useecc is set to 1, which is found in nand.h: #define NAND_ECC_SOFT 1 Similar in wbuf.c struct nand_oobinfo jffs2_oobinfo = { useecc: 1, eccpos: {JFFS2_OOB_ECCPOS0, JFFS2_OOB_ECCPOS1, JFFS2_OOB_ECCPOS2, JFFS2_OOB_ECCPOS3, JFFS2_OOB_ECCPOS4, JFFS2_OOB_ECCPOS5} }; int jffs2_flash_read(struct jffs2_sb_info *c, loff_t ofs, size_t len, size_t *retlen, u_char *buf) { loff_t orbf = 0, owbf = 0, lwbf = 0; int ret; /* Read flash */ if (!jffs2_can_mark_obsolete(c)) { ret = c->mtd->read_ecc(c->mtd, ofs, len, retlen, buf, NULL, &jffs2_oobinfo); <SNIP> I found this while studying nftlmount.c. In function find_boot_record there might be a bug. In line 223: if ((ret = MTD_READECC(nftl->mtd, block * nftl->EraseSize + i + SECTORSIZE, SECTORSIZE, &retlen, buf,(char *)&oob, NAND_ECC_DISKONCHIP)) < 0) { NAND_ECC_DISKONCHIP is #defined as 5. As I steped over MTD_READECC I found called nand_read_ecc, which wants a pointer (struct nand_oobinfo *oobsel )as last argument. I use a cvs snapshot dated 20030318, cross compiled for ARM7TDMI Hope this all makes some sense and helps. regards Gerhard Uttenthaler Edward J. Lee schrieb: > Thomas Gleixner wrote: > >> On Monday 14 April 2003 07:13, Edward Lee (???) wrote: >> >> >>> Hi Earl, thanks for the help. >>> >>> I didn't use nandwrite, I wrote on the chip using plain stuff like >>> 'cp' or >>> 'tar', etc. (having a file system on my device, I couldn't find a reason >>> to write files using other programs) >>> >> >> nandwrite is just used to copy a filesystem image to a unformatted chip. >> If you have mounted the fs already, then nandwrite would be the wrong >> tool. >> >> These messages have a different reason. I assume that you followed the >> advice on yaffs list and you have enabled YAFFS_USE_NANDECC and >> disabled YAFFS_USE_OLD_MTD. >> >> Then I can only guess, that you did not select a ecc mode in your >> board driver code. >> <SNIP> >> /* 20 us command delay time */ >> this->chip_delay = 20; >> this->eccmode = NAND_ECC_SOFT; >> <SNIP> >> >> NAND_ECC_SOFT is the right choice, if you don't have a hardware ecc >> generator. >> If you have one, you must supply the neccecary functions to use it. >> >> >> > this->eccmode is indeed set to NAND_ECC_SOFT. > I guess my case is kind of 'extra-tricky'. I just found out another > weird thing, > that the warning messages complaining '...without ECC...' do NOT appear > when > I'm 'writing' on the chip. Strange, eh. :'( > > > ______________________________________________________ > Linux MTD discussion mailing list > http://lists.infradead.org/mailman/listinfo/linux-mtd/ > > ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: A question on ECC 2003-04-14 10:03 ` Gerhard Uttenthaler @ 2003-04-14 11:17 ` Thomas Gleixner 0 siblings, 0 replies; 14+ messages in thread From: Thomas Gleixner @ 2003-04-14 11:17 UTC (permalink / raw) To: Gerhard Uttenthaler, linux-mtd On Monday 14 April 2003 12:03, Gerhard Uttenthaler wrote: > Which eccmode is used seems to be set from the calling function of > nand_read_ecc. I found: TRUE > in nandwrite.c: > struct nand_oobinfo jffs2_oobinfo = { > useecc: 1, > eccpos: { 0, 1, 2, 3, 6, 7} > }; > Here useecc is set to 1, which is found in nand.h: > #define NAND_ECC_SOFT 1 CRAP. ECC_TYPE (SOFT OR HARD) is set in the board specific driver and nowhere else. Read: http://www.linux-mtd.infradead.org/tech/nand.html useecc is given by the calling program (filesystem or userspace utility) to tell the nand driver to USE ECC. eccpos is given to tell te nand driver WHERE to put / get ECC in oobarea This was made to have support for different filesystems on one NAND chip. eg. JFFS2 and YAFFS. > > I found this while studying nftlmount.c. In function find_boot_record > there might be a bug. NTFL does _NOT_ use nand.c functions at all !!!!!! DO NOT MIXUP STUFF HERE ! > Hope this all makes some sense and helps. NO, see above --- Thomas ________________________________________________________________________ linutronix - competence in embedded & realtime linux http://www.linutronix.de mail: tglx@linutronix.de ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: A question on ECC 2003-04-14 17:40 ` Edward J. Lee 2003-04-14 10:03 ` Gerhard Uttenthaler @ 2003-04-14 11:25 ` Thomas Gleixner 2003-04-18 9:47 ` Edward J. Lee 2003-04-14 14:06 ` Earl Manning 2 siblings, 1 reply; 14+ messages in thread From: Thomas Gleixner @ 2003-04-14 11:25 UTC (permalink / raw) To: Edward J. Lee; +Cc: linux-mtd On Monday 14 April 2003 19:40, Edward J. Lee wrote: > > this->eccmode is indeed set to NAND_ECC_SOFT. > I guess my case is kind of 'extra-tricky'. I just found out another > weird thing, > that the warning messages complaining '...without ECC...' do NOT appear > when I'm 'writing' on the chip. Strange, eh. :'( Can you put some debug output YAFFS ? --- yaffs_mtdif.c 8 Apr 2003 19:53:44 -0000 1.9 +++ yaffs_mtdif.c 14 Apr 2003 10:23:39 -0000 @@ -90,10 +90,12 @@ if(dev->useNANDECC) { // Careful, this call adds 2 ints to the end of the spare data. Calling function should // allocate enough memory for spare, i.e. [YAFFS_BYTES_PER_SPARE+2*sizeof(int)]. + printk (KERN_DEBUG "YAFFS ReadChunk with real ECC_INFO\n"); retval = mtd->read_ecc(mtd,addr,dev->nBytesPerChunk,&dummy,data,spareAsBytes,&yaffs_oobinfo); } else { + printk (KERN_DEBUG "YAFFS ReadChunk with dummy ECC_INFO\n"); retval = mtd->read_ecc(mtd,addr,dev->nBytesPerChunk,&dummy,data,spareAsBytes,&yaffs_noeccinfo); } } -- Thomas ________________________________________________________________________ linutronix - competence in embedded & realtime linux http://www.linutronix.de mail: tglx@linutronix.de ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: A question on ECC 2003-04-14 11:25 ` Thomas Gleixner @ 2003-04-18 9:47 ` Edward J. Lee 2003-04-18 8:49 ` Thomas Gleixner 0 siblings, 1 reply; 14+ messages in thread From: Edward J. Lee @ 2003-04-18 9:47 UTC (permalink / raw) To: tglx, linux-mtd Thomas Gleixner wrote: >On Monday 14 April 2003 19:40, Edward J. Lee wrote: > > >>this->eccmode is indeed set to NAND_ECC_SOFT. >>I guess my case is kind of 'extra-tricky'. I just found out another >>weird thing, >>that the warning messages complaining '...without ECC...' do NOT appear >>when I'm 'writing' on the chip. Strange, eh. :'( >> >> > >Can you put some debug output YAFFS ? > >--- yaffs_mtdif.c 8 Apr 2003 19:53:44 -0000 1.9 >+++ yaffs_mtdif.c 14 Apr 2003 10:23:39 -0000 >@@ -90,10 +90,12 @@ > if(dev->useNANDECC) > { // Careful, this call adds 2 ints to the end of the spare data. >Calling function should > // allocate enough memory for spare, i.e. >[YAFFS_BYTES_PER_SPARE+2*sizeof(int)]. >+ printk (KERN_DEBUG "YAFFS ReadChunk with real ECC_INFO\n"); > retval = >mtd->read_ecc(mtd,addr,dev->nBytesPerChunk,&dummy,data,spareAsBytes,&yaffs_oobinfo); > } > else > { >+ printk (KERN_DEBUG "YAFFS ReadChunk with dummy ECC_INFO\n"); > retval = >mtd->read_ecc(mtd,addr,dev->nBytesPerChunk,&dummy,data,spareAsBytes,&yaffs_noeccinfo); > } > } > > > > I tried this last night, and I got a bunch of "YAFFS ReadChunk with real ECC_INFO". when both reading/writing. Nothing else, do we need more information? ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: A question on ECC 2003-04-18 9:47 ` Edward J. Lee @ 2003-04-18 8:49 ` Thomas Gleixner 2003-04-19 4:14 ` Edward Lee (???) 0 siblings, 1 reply; 14+ messages in thread From: Thomas Gleixner @ 2003-04-18 8:49 UTC (permalink / raw) To: Edward J. Lee, linux-mtd On Friday 18 April 2003 11:47, Edward J. Lee wrote: > > I tried this last night, and I got a bunch of "YAFFS ReadChunk with real > ECC_INFO". > when both reading/writing. > Nothing else, do we need more information? I assume there were no messages containing YAFFS ReadChunk with dummy ECC info. That means, YAFFS supplies always a pointer to yaffs_oobinfo structure. Do the "I'ts not recommended ...." messages follow up the above message, or show they up elsewhere ? That means, are they really related to accessing the YAFFS partitions ? Please provide a short debug output, where I can see the context of those "It's not recommended ..." messages. Are there any other functions accessing the flash device ? You use 2 partitions out of 5 for YAFFS. What are the other partitions for? -- Thomas ________________________________________________________________________ linutronix - competence in embedded & realtime linux http://www.linutronix.de mail: tglx@linutronix.de ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: A question on ECC 2003-04-18 8:49 ` Thomas Gleixner @ 2003-04-19 4:14 ` Edward Lee (???) 2003-04-19 7:31 ` Thomas Gleixner 0 siblings, 1 reply; 14+ messages in thread From: Edward Lee (???) @ 2003-04-19 4:14 UTC (permalink / raw) To: tglx; +Cc: linux-mtd ----- Original Message ----- From: "Thomas Gleixner" <tglx@linutronix.de> To: "Edward J. Lee" <noshel@idis.co.kr>; <linux-mtd@lists.infradead.org> Sent: Friday, April 18, 2003 5:49 PM Subject: Re: A question on ECC > On Friday 18 April 2003 11:47, Edward J. Lee wrote: > > > > I tried this last night, and I got a bunch of "YAFFS ReadChunk with real > > ECC_INFO". > > when both reading/writing. > > Nothing else, do we need more information? > > I assume there were no messages containing YAFFS ReadChunk with dummy ECC > info. right. > That means, YAFFS supplies always a pointer to yaffs_oobinfo structure. > Do the "I'ts not recommended ...." messages follow up the above message, or > show they up elsewhere ? That means, are they really related to accessing the > YAFFS partitions ? Please provide a short debug output, where I can see the > context of those "It's not recommended ..." messages. I'm currently not in the proper environment to send you the debug msgs, but I can tell you that the 'It's not recommended...' stuff came out just 'before' the YAFFS msgs did. A bunch of 'It's not recommended...', and then another bunch of 'Real Chunk..'. I send you the output next monday, I'll have to newly setup a few things before trying it again. > > Are there any other functions accessing the flash device ? > > You use 2 partitions out of 5 for YAFFS. What are the other partitions for? > The first partition contains the state of the whole device, the second and third has the kernel image, (the first three partitions are stored as raw binary) and the forth and fifth is used as YAFFS. > -- > Thomas > ________________________________________________________________________ > linutronix - competence in embedded & realtime linux > http://www.linutronix.de > mail: tglx@linutronix.de > > ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: A question on ECC 2003-04-19 4:14 ` Edward Lee (???) @ 2003-04-19 7:31 ` Thomas Gleixner 0 siblings, 0 replies; 14+ messages in thread From: Thomas Gleixner @ 2003-04-19 7:31 UTC (permalink / raw) To: Edward Lee (???); +Cc: linux-mtd On Saturday 19 April 2003 06:14, Edward Lee (???) wrote: > > That means, YAFFS supplies always a pointer to yaffs_oobinfo structure. > > Do the "I'ts not recommended ...." messages follow up the above message, > > or show they up elsewhere ? That means, are they really related to > > accessing the YAFFS partitions ? Please provide a short debug output, > > where I can see the context of those "It's not recommended ..." messages. > > > I'm currently not in the proper environment to send you the debug msgs, > but I can tell you that the 'It's not recommended...' stuff came out just > 'before' the YAFFS msgs did. A bunch of 'It's not recommended...', and > then another bunch of 'Real Chunk..'. > I send you the output next monday, I'll have to newly setup a few things > before trying it again. Add "rootfs=yaffs" to your commandline. The kernel tries various filesystems before it hits yaffs > The first partition contains the state of the whole device, > the second and third has the kernel image, (the first three partitions are > stored as raw binary) and the forth and fifth is used as YAFFS. OK, but you don't access them from Linux ? -- Thomas ________________________________________________________________________ linutronix - competence in embedded & realtime linux http://www.linutronix.de mail: tglx@linutronix.de ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: A question on ECC 2003-04-14 17:40 ` Edward J. Lee 2003-04-14 10:03 ` Gerhard Uttenthaler 2003-04-14 11:25 ` Thomas Gleixner @ 2003-04-14 14:06 ` Earl Manning 2003-04-14 15:26 ` Thomas Gleixner 2 siblings, 1 reply; 14+ messages in thread From: Earl Manning @ 2003-04-14 14:06 UTC (permalink / raw) Cc: tglx, linux-mtd Hi Tom and Edward, I guess I misunderstood the question. I didn't realize that the image was already up and running. On my board I got that message because I had laid down the original image on the NAND flash without putting ECC into the OOB. Althought, it does sound like new writes do use the SOFT ECC flag and that is why there are no complaints. How did you get the ECC stuff into the OOB to start with? Earl On Tue, 15 Apr 2003 02:40:05 +0900 "Edward J. Lee" <noshel@idis.co.kr> wrote: > Thomas Gleixner wrote: > > >On Monday 14 April 2003 07:13, Edward Lee (???) wrote: > > > > > >>Hi Earl, thanks for the help. > >> > >>I didn't use nandwrite, I wrote on the chip using plain stuff like 'cp' or > >>'tar', etc. (having a file system on my device, I couldn't find a reason > >>to write files using other programs) > >> > >> > >nandwrite is just used to copy a filesystem image to a unformatted chip. > >If you have mounted the fs already, then nandwrite would be the wrong tool. > > > >These messages have a different reason. I assume that you followed the advice > >on yaffs list and you have enabled YAFFS_USE_NANDECC and disabled > >YAFFS_USE_OLD_MTD. > > > >Then I can only guess, that you did not select a ecc mode in your board driver > >code. > > > ><SNIP> > > /* 20 us command delay time */ > > this->chip_delay = 20; > > this->eccmode = NAND_ECC_SOFT; > ><SNIP> > > > >NAND_ECC_SOFT is the right choice, if you don't have a hardware ecc generator. > >If you have one, you must supply the neccecary functions to use it. > > > > > > > this->eccmode is indeed set to NAND_ECC_SOFT. > I guess my case is kind of 'extra-tricky'. I just found out another > weird thing, > that the warning messages complaining '...without ECC...' do NOT appear when > I'm 'writing' on the chip. Strange, eh. :'( > > > ______________________________________________________ > Linux MTD discussion mailing list > http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: A question on ECC 2003-04-14 14:06 ` Earl Manning @ 2003-04-14 15:26 ` Thomas Gleixner 0 siblings, 0 replies; 14+ messages in thread From: Thomas Gleixner @ 2003-04-14 15:26 UTC (permalink / raw) To: Earl Manning; +Cc: linux-mtd On Monday 14 April 2003 16:06, Earl Manning wrote: > Althought, it does sound like new writes do use the SOFT ECC flag and that > is why there are no complaints. How did you get the ECC stuff into the OOB > to start with? I think you missunderstand it again. :) The offending message "Reading data from NAND FLASH without ECC is not recommended". is printed, if nand_read_ecc is called with a oobinfo structure, which has set useecc to zero or without a oobinfo pointer. That's not related to writing data with or without ECC. Please read and understand the code there and then post helpful suggestions. -- Thomas ________________________________________________________________________ linutronix - competence in embedded & realtime linux http://www.linutronix.de mail: tglx@linutronix.de ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2003-04-19 6:32 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2003-04-14 0:18 A question on ECC Edward Lee \(이장원\) 2003-04-14 2:01 ` Earl Manning 2003-04-14 5:13 ` Edward Lee (???) 2003-04-14 7:54 ` Thomas Gleixner 2003-04-14 17:40 ` Edward J. Lee 2003-04-14 10:03 ` Gerhard Uttenthaler 2003-04-14 11:17 ` Thomas Gleixner 2003-04-14 11:25 ` Thomas Gleixner 2003-04-18 9:47 ` Edward J. Lee 2003-04-18 8:49 ` Thomas Gleixner 2003-04-19 4:14 ` Edward Lee (???) 2003-04-19 7:31 ` Thomas Gleixner 2003-04-14 14:06 ` Earl Manning 2003-04-14 15:26 ` Thomas Gleixner
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox