All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] NAND Flash with Internal Hardware ECC
@ 2015-03-26  8:45 Rajiv Dave
  2015-03-27  2:52 ` Josh Wu
  0 siblings, 1 reply; 4+ messages in thread
From: Rajiv Dave @ 2015-03-26  8:45 UTC (permalink / raw)
  To: u-boot

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

>

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 \b\b\b 2 \b\b\b 1 \b\b\b 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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] NAND Flash with Internal Hardware ECC
  2015-03-26  8:45 [U-Boot] NAND Flash with Internal Hardware ECC Rajiv Dave
@ 2015-03-27  2:52 ` Josh Wu
  2015-03-27 12:41   ` Rajiv Dave
  0 siblings, 1 reply; 4+ messages in thread
From: Josh Wu @ 2015-03-27  2:52 UTC (permalink / raw)
  To: u-boot

Hello, Dave

On 3/26/2015 4:45 PM, Rajiv Dave wrote:
> 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
>
> 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 \b\b\b 2 \b\b\b 1 \b\b\b 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] NAND Flash with Internal Hardware ECC
  2015-03-27  2:52 ` Josh Wu
@ 2015-03-27 12:41   ` Rajiv Dave
  2015-03-30  1:42     ` Josh Wu
  0 siblings, 1 reply; 4+ messages in thread
From: Rajiv Dave @ 2015-03-27 12:41 UTC (permalink / raw)
  To: u-boot

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.



> From: Josh Wu <josh.wu@atmel.com>
> Date: Fri, 27 Mar 2015 10:52:29 +0800
> To: Rajiv Dave <rajivd@disignconsultants.com>, <u-boot@lists.denx.de>
> Subject: Re: [U-Boot] NAND Flash with Internal Hardware ECC
> 
> Hello, Dave
> 
> On 3/26/2015 4:45 PM, Rajiv Dave wrote:
>> 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
>> 
>> 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 \b\b\b 2 \b\b\b 1 \b\b\b 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
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] NAND Flash with Internal Hardware ECC
  2015-03-27 12:41   ` Rajiv Dave
@ 2015-03-30  1:42     ` Josh Wu
  0 siblings, 0 replies; 4+ messages in thread
From: Josh Wu @ 2015-03-30  1:42 UTC (permalink / raw)
  To: u-boot

Hi, Dave

On 3/27/2015 8:41 PM, Rajiv Dave wrote:
> Hi Josh,
>
> That worked! Many thanks.

You are welcome  ;-)

>
> 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
>
>
> 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.
>
>
>
>> From: Josh Wu <josh.wu@atmel.com>
>> Date: Fri, 27 Mar 2015 10:52:29 +0800
>> To: Rajiv Dave <rajivd@disignconsultants.com>, <u-boot@lists.denx.de>
>> Subject: Re: [U-Boot] NAND Flash with Internal Hardware ECC
>>
>> Hello, Dave
>>
>> On 3/26/2015 4:45 PM, Rajiv Dave wrote:
>>> 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
>>> 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 \b\b\b 2 \b\b\b 1 \b\b\b 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
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-30  1:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-26  8:45 [U-Boot] NAND Flash with Internal Hardware ECC Rajiv Dave
2015-03-27  2:52 ` Josh Wu
2015-03-27 12:41   ` Rajiv Dave
2015-03-30  1:42     ` Josh Wu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.