Skip to contentSkip to conversation

NAND Flash with Internal Hardware ECC

U-Boot Rajiv Dave 2 participants 4 messages Mar 26, 2015 – Mar 30, 2015

lore
Share & tools
lore

Rajiv Dave

author
#0 lore raw

Hi,

We are using an Atmel AT91SAM9263 processor which supports 1 Bit ECC flash devices that have Block 0 Valid with no ECC. These devices are now obsolete.

We have fitted a board with a MT29F2G08ABAEWP-E-E, which has an internal Hardware ECC engine. Would you know how provide support for this device within U-Boot?

The following output is generated by a board fitted with the NAND Flash with Internal Hardware ECC

RomBOOT

Quoted 1 line

U-Boot 1.3.4 (Sep 19 2013 - 15:10:38)

DRAM:  64 MB
NAND:  256 MiB
No Valid Environment Area Found
In:    serial
Out:   serial
Err:   serial
Net:   macb0
macb0: Starting autonegotiation...
macb0: Autonegotiation timed out (status=0x7849)
macb0: link down (status: 0x7849)
Hit any key to stop autoboot:  3  2  1  0

NAND read: device 0 offset 0x200000, size 0x17e16c
1565036 bytes read: ERROR
## Booting kernel from Legacy Image at 22200000 ...

   Image Name:   Linux-2.6.30
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1564972 Bytes =  1.5 MB

Load Address: 20008000
Entry Point: 20008000
Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!
U-Boot>

Regards

Rajiv Dave

Disign Consultants
t: +44 (0) 207 544 8486
w: www.disignconsultants.com

This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.

#1 lore raw

Hello, Dave

Quoted 8 lines · Rajiv Dave

Hi,

We are using an Atmel AT91SAM9263 processor which supports 1 Bit ECC flash devices that have Block 0 Valid with no ECC. These devices are now obsolete.

We have fitted a board with a MT29F2G08ABAEWP-E-E, which has an internal Hardware ECC engine. Would you know how provide support for this device within U-Boot?

As your flash have internal ecc, you should disable the AT91SAM9263 ecc.

it means you need to set the nand->ecc.mode to NAME_ECC_NONE in the U-Boot if you already enabled internal Hardware ECC.

Best Regards,
Josh Wu

Quoted 52 lines

The following output is generated by a board fitted with the NAND Flash with Internal Hardware ECC

RomBOOT

U-Boot 1.3.4 (Sep 19 2013 - 15:10:38)

DRAM:  64 MB
NAND:  256 MiB
No Valid Environment Area Found
In:    serial
Out:   serial
Err:   serial
Net:   macb0
macb0: Starting autonegotiation...
macb0: Autonegotiation timed out (status=0x7849)
macb0: link down (status: 0x7849)
Hit any key to stop autoboot:  3  2  1  0

NAND read: device 0 offset 0x200000, size 0x17e16c
1565036 bytes read: ERROR
## Booting kernel from Legacy Image at 22200000 ...

    Image Name:   Linux-2.6.30
    Image Type:   ARM Linux Kernel Image (uncompressed)
    Data Size:    1564972 Bytes =  1.5 MB
    Load Address: 20008000
    Entry Point:  20008000
    Verifying Checksum ... Bad Data CRC

ERROR: can't get kernel image!
U-Boot>

Regards

Rajiv Dave

Disign Consultants
t: +44 (0) 207 544 8486
w: www.disignconsultants.com

This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

author
#2 lore raw

Hi Josh,

That worked! Many thanks.

The next issue is that the Kernel now needs to be re-built, we are using 2.6.xx, do you have any ideas on what to change in the Kernel to make it work with the HW ECC NAND?

Regards

Rajiv Dave

Disign Consultants
t: +44 (0) 207 544 8486
w: www.disignconsultants.com

This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.

Quoted 77 lines

From: Josh Wu <[email protected]>
Date: Fri, 27 Mar 2015 10:52:29 +0800
To: Rajiv Dave <[email protected]>, <[email protected]>
Subject: Re: [U-Boot] NAND Flash with Internal Hardware ECC

Hello, Dave

Quoted 8 lines · Rajiv Dave

Hi,

We are using an Atmel AT91SAM9263 processor which supports 1 Bit ECC flash devices that have Block 0 Valid with no ECC. These devices are now obsolete.

We have fitted a board with a MT29F2G08ABAEWP-E-E, which has an internal Hardware ECC engine. Would you know how provide support for this device within U-Boot?

As your flash have internal ecc, you should disable the AT91SAM9263 ecc.

it means you need to set the nand->ecc.mode to NAME_ECC_NONE in the U-Boot if you already enabled internal Hardware ECC.

Best Regards,
Josh Wu

Quoted 52 lines

The following output is generated by a board fitted with the NAND Flash with Internal Hardware ECC

RomBOOT

U-Boot 1.3.4 (Sep 19 2013 - 15:10:38)

DRAM:  64 MB
NAND:  256 MiB
No Valid Environment Area Found
In:    serial
Out:   serial
Err:   serial
Net:   macb0
macb0: Starting autonegotiation...
macb0: Autonegotiation timed out (status=0x7849)
macb0: link down (status: 0x7849)
Hit any key to stop autoboot:  3  2  1  0

NAND read: device 0 offset 0x200000, size 0x17e16c
1565036 bytes read: ERROR
## Booting kernel from Legacy Image at 22200000 ...

    Image Name:   Linux-2.6.30
    Image Type:   ARM Linux Kernel Image (uncompressed)
    Data Size:    1564972 Bytes =  1.5 MB
    Load Address: 20008000
    Entry Point:  20008000
    Verifying Checksum ... Bad Data CRC

ERROR: can't get kernel image!
U-Boot>

Regards

Rajiv Dave

Disign Consultants
t: +44 (0) 207 544 8486
w: www.disignconsultants.com

This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#3 lore raw

Hi, Dave

Quoted 3 lines · Rajiv Dave

Hi Josh,

That worked! Many thanks.

You are welcome ;-)

Quoted 4 lines

The next issue is that the Kernel now needs to be re-built, we are using 2.6.xx, do you have any ideas on what to change in the Kernel to make it work with the HW ECC NAND?

If you are using the github/linux-2.6.39-at91 branch, you need change the arch/arm/mach-at91/board-sam9263ek.c to set .ecc_mode as NAND_ECC_NONE.

Best Regards,
Josh Wu

Quoted 95 lines

Regards

Rajiv Dave

Disign Consultants
t: +44 (0) 207 544 8486
w: www.disignconsultants.com

This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.

Quoted 75 lines

From: Josh Wu <[email protected]>
Date: Fri, 27 Mar 2015 10:52:29 +0800
To: Rajiv Dave <[email protected]>, <[email protected]>
Subject: Re: [U-Boot] NAND Flash with Internal Hardware ECC

Hello, Dave

Quoted 8 lines · Rajiv Dave

Hi,

We are using an Atmel AT91SAM9263 processor which supports 1 Bit ECC flash devices that have Block 0 Valid with no ECC. These devices are now obsolete.

We have fitted a board with a MT29F2G08ABAEWP-E-E, which has an internal Hardware ECC engine. Would you know how provide support for this device within U-Boot?

As your flash have internal ecc, you should disable the AT91SAM9263 ecc.

it means you need to set the nand->ecc.mode to NAME_ECC_NONE in the U-Boot if you already enabled internal Hardware ECC.

Best Regards,
Josh Wu

Quoted 51 lines

The following output is generated by a board fitted with the NAND Flash with Internal Hardware ECC

RomBOOT

U-Boot 1.3.4 (Sep 19 2013 - 15:10:38)

DRAM:  64 MB
NAND:  256 MiB
No Valid Environment Area Found
In:    serial
Out:   serial
Err:   serial
Net:   macb0
macb0: Starting autonegotiation...
macb0: Autonegotiation timed out (status=0x7849)
macb0: link down (status: 0x7849)
Hit any key to stop autoboot:  3  2  1  0

NAND read: device 0 offset 0x200000, size 0x17e16c
1565036 bytes read: ERROR
## Booting kernel from Legacy Image at 22200000 ...

     Image Name:   Linux-2.6.30
     Image Type:   ARM Linux Kernel Image (uncompressed)
     Data Size:    1564972 Bytes =  1.5 MB
     Load Address: 20008000
     Entry Point:  20008000
     Verifying Checksum ... Bad Data CRC

ERROR: can't get kernel image!
U-Boot>

Regards

Rajiv Dave

Disign Consultants
t: +44 (0) 207 544 8486
w: www.disignconsultants.com

This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot