diff mbox

DM355: Update NAND driver platform data

Message ID 1253156388-9708-1-git-send-email-nsnehaprabha@ti.com (mailing list archive)
State Accepted
Headers show

Commit Message

nsnehaprabha@ti.com Sept. 17, 2009, 2:59 a.m. UTC
From: Sneha Narnakaje <nsnehaprabha@ti.com>

This patch updates the NAND driver platform data to use 4-bit ECC and the
ECC_HW/ECC_HW_OOB_FIRST modes.

Signed-off-by: Sneha Narnakaje <nsnehaprabha@ti.com>
---
 arch/arm/mach-davinci/board-dm355-evm.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Comments

Rajashekhara, Sudhakar Sept. 18, 2009, 10:20 a.m. UTC | #1
Sneha,

Today I tested these 4-bit ECC patches on DA850/OMAP-L138 and here
are my observations:

I booted the kernel and wrote a JFFS2 file system image to a NAND
partition. I rebooted the board (1st time after writing the file
system image)and modified the bootargs to pick up the file system
from the NAND partition. While booting the kernel prints warning
messages like:

Empty flash at 0x0000fffc ends at 0x00010000
Empty flash at 0x0002fffc ends at 0x00030000
Empty flash at 0x0004fffc ends at 0x00050000
Empty flash at 0x0006fffc ends at 0x00070000
Empty flash at 0x0008fffc ends at 0x00090000
Empty flash at 0x000afffc ends at 0x000b0000
Empty flash at 0x000cfffc ends at 0x000d0000
....
....

The board boots properly after these messages.

After the board boots, if I just restart the EVM without even logging
In (2nd time onwards, after the file system image is written), I see
the following messages from the kernel while booting:

Empty flash at 0x0008fffc ends at 0x00090000
Empty flash at 0x000afffc ends at 0x000b0000
Empty flash at 0x000cfffc ends at 0x000d0000
mtd->read(0x1fc20 bytes from 0x3a03e0) returned ECC error
mtd->read(0x10dbc bytes from 0x3af244) returned ECC error
mtd->read(0x448 bytes from 0x3afbb8) returned ECC error
mtd->read(0x7bc bytes from 0x3af844) returned ECC error
mtd->read(0x790 bytes from 0x3af870) returned ECC error
....
....
 
The board boots up properly after the messages and the file system
seems to be intact in-spite of ECC errors.

I tried the above tests on DM355 EVM, and there also I observed the
same behavior. One thing which I noticed is, without the 4-bit ECC
patches I am not seeing ECC error messages but the Empty flash
messages do appear. Do you have any idea what's going wrong here?

Regards, Sudhakar

On Thu, Sep 17, 2009 at 08:29:48, nsnehaprabha@ti.com wrote:
> From: Sneha Narnakaje <nsnehaprabha@ti.com>
> 
> This patch updates the NAND driver platform data to use 4-bit ECC and the
> ECC_HW/ECC_HW_OOB_FIRST modes.
> 
> Signed-off-by: Sneha Narnakaje <nsnehaprabha@ti.com>
> ---
>  arch/arm/mach-davinci/board-dm355-evm.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c
> index 9f25fd8..d12c9e9 100644
> --- a/arch/arm/mach-davinci/board-dm355-evm.c
> +++ b/arch/arm/mach-davinci/board-dm355-evm.c
> @@ -84,8 +84,9 @@ static struct davinci_nand_pdata davinci_nand_data = {
>  	.mask_chipsel		= BIT(14),
>  	.parts			= davinci_nand_partitions,
>  	.nr_parts		= ARRAY_SIZE(davinci_nand_partitions),
> -	.ecc_mode		= NAND_ECC_HW_SYNDROME,
> +	.ecc_mode		= NAND_ECC_HW,
>  	.options		= NAND_USE_FLASH_BBT,
> +	.ecc_bits		= 4,
>  };
>  
>  static struct resource davinci_nand_resources[] = {
> -- 
> 1.6.0.4
> 
> _______________________________________________
> Davinci-linux-open-source mailing list
> Davinci-linux-open-source@linux.davincidsp.com
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
>
nsnehaprabha@ti.com Sept. 18, 2009, 11:53 a.m. UTC | #2
Sudhakar,

> -----Original Message-----
> From: Sudhakar Rajashekhara [mailto:sudhakar.raj@ti.com]
> Sent: Friday, September 18, 2009 6:21 AM
> To: Narnakaje, Snehaprabha; davinci-linux-open-source@linux.davincidsp.com
> Subject: RE: [PATCH] DM355: Update NAND driver platform data
> 
> Sneha,
> 
> Today I tested these 4-bit ECC patches on DA850/OMAP-L138 and here
> are my observations:

Did you also apply the 4-bit ECC patches from -mm tree (my previous email to Kevin)? Those patches are not yet there on the linux-davinci tree.

> 
> I booted the kernel and wrote a JFFS2 file system image to a NAND
> partition. I rebooted the board (1st time after writing the file
> system image)and modified the bootargs to pick up the file system
> from the NAND partition. While booting the kernel prints warning
> messages like:
> 
> Empty flash at 0x0000fffc ends at 0x00010000
> Empty flash at 0x0002fffc ends at 0x00030000
> Empty flash at 0x0004fffc ends at 0x00050000
> Empty flash at 0x0006fffc ends at 0x00070000
> Empty flash at 0x0008fffc ends at 0x00090000
> Empty flash at 0x000afffc ends at 0x000b0000
> Empty flash at 0x000cfffc ends at 0x000d0000
> ....
> ....
> 
> The board boots properly after these messages.
> 
> After the board boots, if I just restart the EVM without even logging
> In (2nd time onwards, after the file system image is written), I see
> the following messages from the kernel while booting:
> 
> Empty flash at 0x0008fffc ends at 0x00090000
> Empty flash at 0x000afffc ends at 0x000b0000
> Empty flash at 0x000cfffc ends at 0x000d0000
> mtd->read(0x1fc20 bytes from 0x3a03e0) returned ECC error
> mtd->read(0x10dbc bytes from 0x3af244) returned ECC error
> mtd->read(0x448 bytes from 0x3afbb8) returned ECC error
> mtd->read(0x7bc bytes from 0x3af844) returned ECC error
> mtd->read(0x790 bytes from 0x3af870) returned ECC error
> ....
> ....
> 
> The board boots up properly after the messages and the file system
> seems to be intact in-spite of ECC errors.
> 
> I tried the above tests on DM355 EVM, and there also I observed the
> same behavior. One thing which I noticed is, without the 4-bit ECC
> patches I am not seeing ECC error messages but the Empty flash
> messages do appear. Do you have any idea what's going wrong here?

We have tested JFFS2 on DM355 using the following patch and the 4-bit ECC patches (currently on -mm tree) and did not see the above issues. I am assuming you have used flash_eraseall before populating the JFFS2 filesystem.

Thanks
Sneha

> 
> Regards, Sudhakar
> 
> On Thu, Sep 17, 2009 at 08:29:48, nsnehaprabha@ti.com wrote:
> > From: Sneha Narnakaje <nsnehaprabha@ti.com>
> >
> > This patch updates the NAND driver platform data to use 4-bit ECC and
> the
> > ECC_HW/ECC_HW_OOB_FIRST modes.
> >
> > Signed-off-by: Sneha Narnakaje <nsnehaprabha@ti.com>
> > ---
> >  arch/arm/mach-davinci/board-dm355-evm.c |    3 ++-
> >  1 files changed, 2 insertions(+), 1 deletions(-)
> >
> > diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-
> davinci/board-dm355-evm.c
> > index 9f25fd8..d12c9e9 100644
> > --- a/arch/arm/mach-davinci/board-dm355-evm.c
> > +++ b/arch/arm/mach-davinci/board-dm355-evm.c
> > @@ -84,8 +84,9 @@ static struct davinci_nand_pdata davinci_nand_data = {
> >  	.mask_chipsel		= BIT(14),
> >  	.parts			= davinci_nand_partitions,
> >  	.nr_parts		= ARRAY_SIZE(davinci_nand_partitions),
> > -	.ecc_mode		= NAND_ECC_HW_SYNDROME,
> > +	.ecc_mode		= NAND_ECC_HW,
> >  	.options		= NAND_USE_FLASH_BBT,
> > +	.ecc_bits		= 4,
> >  };
> >
> >  static struct resource davinci_nand_resources[] = {
> > --
> > 1.6.0.4
> >
> > _______________________________________________
> > Davinci-linux-open-source mailing list
> > Davinci-linux-open-source@linux.davincidsp.com
> > http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
> >
> 
>
Sekhar Nori Sept. 18, 2009, 1:07 p.m. UTC | #3
On Fri, Sep 18, 2009 at 17:23:33, Narnakaje, Snehaprabha wrote:
> Sudhakar,
>
> > -----Original Message-----
> > From: Sudhakar Rajashekhara [mailto:sudhakar.raj@ti.com]
> > Sent: Friday, September 18, 2009 6:21 AM
> > To: Narnakaje, Snehaprabha; davinci-linux-open-source@linux.davincidsp.com
> > Subject: RE: [PATCH] DM355: Update NAND driver platform data
> >
> > Sneha,
> >
> > Today I tested these 4-bit ECC patches on DA850/OMAP-L138 and here
> > are my observations:
>
> Did you also apply the 4-bit ECC patches from -mm tree (my previous email to Kevin)? Those patches are not yet there on the linux-davinci tree.
>

Sneha,

I think at least some of your 4-Bit ECC patches are in the linux-davinci tree

http://git.kernel.org/?p=linux/kernel/git/khilman/linux-davinci.git;a=commitdiff;h=2c902ca9cd5367122b3d591f44ad81c36f2737cc

http://git.kernel.org/?p=linux/kernel/git/khilman/linux-davinci.git;a=commitdiff;h=9c9c62ebbd2a0371d02649053144206cb649074d

Thanks,
Sekhar
nsnehaprabha@ti.com Sept. 18, 2009, 1:33 p.m. UTC | #4
> -----Original Message-----
> From: Nori, Sekhar
> Sent: Friday, September 18, 2009 9:08 AM
> To: Narnakaje, Snehaprabha; Rajashekhara, Sudhakar; davinci-linux-open-
> source@linux.davincidsp.com
> Subject: RE: [PATCH] DM355: Update NAND driver platform data
> 
> On Fri, Sep 18, 2009 at 17:23:33, Narnakaje, Snehaprabha wrote:
> > Sudhakar,
> >
> > > -----Original Message-----
> > > From: Sudhakar Rajashekhara [mailto:sudhakar.raj@ti.com]
> > > Sent: Friday, September 18, 2009 6:21 AM
> > > To: Narnakaje, Snehaprabha; davinci-linux-open-
> source@linux.davincidsp.com
> > > Subject: RE: [PATCH] DM355: Update NAND driver platform data
> > >
> > > Sneha,
> > >
> > > Today I tested these 4-bit ECC patches on DA850/OMAP-L138 and here
> > > are my observations:
> >
> > Did you also apply the 4-bit ECC patches from -mm tree (my previous
> email to Kevin)? Those patches are not yet there on the linux-davinci
> tree.
> >
> 
> Sneha,
> 
> I think at least some of your 4-Bit ECC patches are in the linux-davinci
> tree
> 
> http://git.kernel.org/?p=linux/kernel/git/khilman/linux-
> davinci.git;a=commitdiff;h=2c902ca9cd5367122b3d591f44ad81c36f2737cc
> 
> http://git.kernel.org/?p=linux/kernel/git/khilman/linux-
> davinci.git;a=commitdiff;h=9c9c62ebbd2a0371d02649053144206cb649074d

OK, I had not checked the linux-davinci kernel earlier.

I will check the DM355 with this kernel and let you know the results.

Thanks
Sneha

> 
> Thanks,
> Sekhar
nsnehaprabha@ti.com Sept. 21, 2009, 2:54 p.m. UTC | #5
Sekhar, Sudhakar,

> >
> > Sneha,
> >
> > I think at least some of your 4-Bit ECC patches are in the linux-davinci
> > tree
> >
> > http://git.kernel.org/?p=linux/kernel/git/khilman/linux-
> > davinci.git;a=commitdiff;h=2c902ca9cd5367122b3d591f44ad81c36f2737cc
> >
> > http://git.kernel.org/?p=linux/kernel/git/khilman/linux-
> > davinci.git;a=commitdiff;h=9c9c62ebbd2a0371d02649053144206cb649074d
> 
> OK, I had not checked the linux-davinci kernel earlier.
> 
> I will check the DM355 with this kernel and let you know the results.

I tested DM355 with the default 2K (page size) Micron NAND chip for JFFS2 and it works fine. I did multiple reboots and I do not see those errors (Empty flash and ECC errors).

The ECC test also works fine, along with other tests from mtd-test module. You may want to try these tests on the DA850/OMAP-L138 board before checking JFFS2.

> 
> Thanks
> Sneha
> 
> >
> > Thanks,
> > Sekhar
Kevin Hilman Sept. 28, 2009, 6:43 p.m. UTC | #6
nsnehaprabha@ti.com writes:

> From: Sneha Narnakaje <nsnehaprabha@ti.com>
>
> This patch updates the NAND driver platform data to use 4-bit ECC and the
> ECC_HW/ECC_HW_OOB_FIRST modes.
>
> Signed-off-by: Sneha Narnakaje <nsnehaprabha@ti.com>

Applied to davinci git.

Kevin

> ---
>  arch/arm/mach-davinci/board-dm355-evm.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c
> index 9f25fd8..d12c9e9 100644
> --- a/arch/arm/mach-davinci/board-dm355-evm.c
> +++ b/arch/arm/mach-davinci/board-dm355-evm.c
> @@ -84,8 +84,9 @@ static struct davinci_nand_pdata davinci_nand_data = {
>  	.mask_chipsel		= BIT(14),
>  	.parts			= davinci_nand_partitions,
>  	.nr_parts		= ARRAY_SIZE(davinci_nand_partitions),
> -	.ecc_mode		= NAND_ECC_HW_SYNDROME,
> +	.ecc_mode		= NAND_ECC_HW,
>  	.options		= NAND_USE_FLASH_BBT,
> +	.ecc_bits		= 4,
>  };
>  
>  static struct resource davinci_nand_resources[] = {
> -- 
> 1.6.0.4
>
> _______________________________________________
> Davinci-linux-open-source mailing list
> Davinci-linux-open-source@linux.davincidsp.com
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
diff mbox

Patch

diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c
index 9f25fd8..d12c9e9 100644
--- a/arch/arm/mach-davinci/board-dm355-evm.c
+++ b/arch/arm/mach-davinci/board-dm355-evm.c
@@ -84,8 +84,9 @@  static struct davinci_nand_pdata davinci_nand_data = {
 	.mask_chipsel		= BIT(14),
 	.parts			= davinci_nand_partitions,
 	.nr_parts		= ARRAY_SIZE(davinci_nand_partitions),
-	.ecc_mode		= NAND_ECC_HW_SYNDROME,
+	.ecc_mode		= NAND_ECC_HW,
 	.options		= NAND_USE_FLASH_BBT,
+	.ecc_bits		= 4,
 };
 
 static struct resource davinci_nand_resources[] = {