* NAND-Flash ECC data not used
@ 2003-07-08 8:01 Juergen Beisert
2003-07-08 10:42 ` Thomas Gleixner
0 siblings, 1 reply; 5+ messages in thread
From: Juergen Beisert @ 2003-07-08 8:01 UTC (permalink / raw)
To: linux-mtd
Hello all,
I have tried to use a 16MiB NAND flash in my application. It seems to work,
but it also seem that the driver is not using the ECC data. I have derived my
small driver from the spia.c source and have added the line
this->eccmode=NAND_ECC_SOFT;
before calling nand_scan(). nand_scan() inserts the ECC check routines
correctly in the structure. But later, if the jffs2 calls the driver to read
data from flash, it calls nand_read_ecc() with parameter oobsel = 0. So the
line
int eccmode = oobsel ? this->eccmode : NAND_ECC_NONE;
in nand_read_ecc() switches back to NONE ecc mode while reading.
Any ideas what's going wrong?
Juergen Beisert
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: NAND-Flash ECC data not used
2003-07-08 8:01 NAND-Flash ECC data not used Juergen Beisert
@ 2003-07-08 10:42 ` Thomas Gleixner
2003-07-08 12:05 ` Juergen Beisert
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Gleixner @ 2003-07-08 10:42 UTC (permalink / raw)
To: jbeisert, linux-mtd
On Tuesday 08 July 2003 10:01, Juergen Beisert wrote:
> Hello all,
>
> I have tried to use a 16MiB NAND flash in my application. It seems to work,
> but it also seem that the driver is not using the ECC data. I have derived
> my small driver from the spia.c source and have added the line
>
> this->eccmode=NAND_ECC_SOFT;
>
> before calling nand_scan(). nand_scan() inserts the ECC check routines
> correctly in the structure. But later, if the jffs2 calls the driver to
> read data from flash, it calls nand_read_ecc() with parameter oobsel = 0.
> So the line
>
> int eccmode = oobsel ? this->eccmode : NAND_ECC_NONE;
>
> in nand_read_ecc() switches back to NONE ecc mode while reading.
Have you enabled CONFIG_JFFS2_NAND ?
This happens on boot up too, if you have not given the fs type in the
commandline and the kernel tries to mount the partition with ext2 first.
It should not happen with jffs2.
--
Thomas
________________________________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx@linutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: NAND-Flash ECC data not used
2003-07-08 10:42 ` Thomas Gleixner
@ 2003-07-08 12:05 ` Juergen Beisert
2003-07-08 16:11 ` Thomas Gleixner
0 siblings, 1 reply; 5+ messages in thread
From: Juergen Beisert @ 2003-07-08 12:05 UTC (permalink / raw)
To: tglx; +Cc: linux-mtd
Am Dienstag, 8. Juli 2003 12:42 schrieben Sie:
> On Tuesday 08 July 2003 10:01, Juergen Beisert wrote:
>
> Have you enabled CONFIG_JFFS2_NAND ?
I cannot find any source- or "Config.in" file that uses or defines this macro.
Not in my 2.4.21pre4 nor in the mtd snapshot (from July 1. 2003).
> This happens on boot up too, if you have not given the fs type in the
> commandline and the kernel tries to mount the partition with ext2 first.
> It should not happen with jffs2.
Id did: mount -t jffs2 /dev/mtdblock5 /flash
JB
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: NAND-Flash ECC data not used
2003-07-08 12:05 ` Juergen Beisert
@ 2003-07-08 16:11 ` Thomas Gleixner
2003-07-09 14:43 ` Juergen Beisert
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Gleixner @ 2003-07-08 16:11 UTC (permalink / raw)
To: jbeisert; +Cc: linux-mtd
On Tuesday 08 July 2003 14:05, Juergen Beisert wrote:
> Am Dienstag, 8. Juli 2003 12:42 schrieben Sie:
> > On Tuesday 08 July 2003 10:01, Juergen Beisert wrote:
> >
> > Have you enabled CONFIG_JFFS2_NAND ?
>
> I cannot find any source- or "Config.in" file that uses or defines this
> macro. Not in my 2.4.21pre4 nor in the mtd snapshot (from July 1. 2003).
>
> > This happens on boot up too, if you have not given the fs type in the
> > commandline and the kernel tries to mount the partition with ext2 first.
> > It should not happen with jffs2.
>
mtd/fs/Config.in contains
dep_tristate 'Journalling Flash File System (JFFS) support' CONFIG_JFFS_FS
$CONFIG_MTD
if [ "$CONFIG_JFFS_FS" = "y" -o "$CONFIG_JFFS_FS" = "m" ] ; then
int 'JFFS debugging verbosity (0 = quiet, 3 = noisy)'
CONFIG_JFFS_FS_VERBOSE 0
bool 'JFFS stats available in /proc filesystem' CONFIG_JFFS_PROC_FS
fi
dep_tristate 'Journalling Flash File System v2 (JFFS2) support'
CONFIG_JFFS2_FS $CONFIG_MTD
if [ "$CONFIG_JFFS2_FS" = "y" -o "$CONFIG_JFFS2_FS" = "m" ] ; then
int 'JFFS2 debugging verbosity (0 = quiet, 2 = noisy)'
CONFIG_JFFS2_FS_DEBUG 0
bool 'JFFS2 support for NAND chips' CONFIG_JFFS2_FS_NAND
fi
This is patched into the linux/fs/Config.in by the patchin.sh script, which
can be found in mtd/patches. It's recommended to use this script.
--
Thomas
________________________________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx@linutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: NAND-Flash ECC data not used
2003-07-08 16:11 ` Thomas Gleixner
@ 2003-07-09 14:43 ` Juergen Beisert
0 siblings, 0 replies; 5+ messages in thread
From: Juergen Beisert @ 2003-07-09 14:43 UTC (permalink / raw)
To: tglx; +Cc: linux-mtd
Am Dienstag, 8. Juli 2003 18:11 schrieben Sie:
> On Tuesday 08 July 2003 14:05, Juergen Beisert wrote:
> > Am Dienstag, 8. Juli 2003 12:42 schrieben Sie:
> > > On Tuesday 08 July 2003 10:01, Juergen Beisert wrote:
> > >
> > > Have you enabled CONFIG_JFFS2_NAND ?
^^^^^^^^^^^^^^^^^^^^^^^
Sorry, I have searched for the macro CONFIG_JFFS2_NAND, not for
CONFIG_JFFS2_FS_NAND.
Now I have find it and patched in. Seems to work now (with ECC).
Thanks a lot
JB
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-07-09 14:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-08 8:01 NAND-Flash ECC data not used Juergen Beisert
2003-07-08 10:42 ` Thomas Gleixner
2003-07-08 12:05 ` Juergen Beisert
2003-07-08 16:11 ` Thomas Gleixner
2003-07-09 14:43 ` Juergen Beisert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox