[#5005] bf526-ezbrd: Nand flash HW / SW ECC not compatible

Document created by Aaronwu Employee on Sep 3, 2013
Version 1Show Document
  • View in full screen mode

[#5005] bf526-ezbrd: Nand flash HW / SW ECC not compatible

Submitted By: Yi Li

Open Date

2009-03-19 05:58:47     Close Date

2009-03-19 06:19:26

Priority:

Medium     Assignee:

Nobody

Status:

Closed     Fixed In Release:

N/A

Found In Release:

snaps     Release:

Category:

N/A     Board:

EZBRD

Processor:

BF526     Silicon Revision:

0.0

Is this bug repeatable?:

Yes     Resolution:

Rejected

Uboot version or rev.:

svn trunk     Toolchain version or rev.:

09r1-3

App binary format:

FLAT     

Summary: bf526-ezbrd: Nand flash HW / SW ECC not compatible

Details:

 

BF526-ezbrd 1.2, chip 0.0

 

In order to verify a customer question on forum: https://blackfin.uclinux.org/gf/project/uclinux-dist/forum/?action=ForumBrowse&forum_id=39&_forum_action=ForumMessageBrowse&thread_id=32918

 

I did test on BF526 nand SW/HW ecc.

 

1. Boot a kernel with Nand SW ECC

------------------------------------

BF5xx on-chip NAND FLash Controller Driver, Version 1.2 (c) 2007 Analog Devices, Inc.

bf5xx-nand bf5xx-nand.0: page_size=256, data_width=8, wr_dly=3, rd_dly=3

NAND device: Manufacturer ID: 0x20, Chip ID: 0xaa (ST Micro NAND 256MiB 1,8V 8-bit)

Creating 2 MTD partitions on "NAND 256MiB 1,8V 8-bit":

0x00000000-0x00400000 : "linux kernel(nand)"

0x00400000-0x10000000 : "file system(nand)"

 

root:/> cat /proc/mtd

dev:    size   erasesize  name

mtd0: 00040000 00010000 "bootloader(nor)"

mtd1: 001c0000 00010000 "linux kernel(nor)"

mtd2: 00200000 00010000 "file system(nor)"

mtd3: 00400000 00020000 "linux kernel(nand)"

mtd4: 0fc00000 00020000 "file system(nand)"

 

root:/> flash_eraseall -j /dev/mtd4

 

root:/> mount -t jffs2 /dev/mtdblock4 /mnt/

 

root:/> cp /bin/busybox /mnt

 

root:/> umount /mnt

 

2. Reset board and boot a kernel with HW ECC

 

root:/> cat /proc/mtd

dev:    size   erasesize  name

mtd0: 00040000 00010000 "bootloader(nor)"

mtd1: 001c0000 00010000 "linux kernel(nor)"

mtd2: 00200000 00010000 "file system(nor)"

mtd3: 00400000 00020000 "linux kernel(nand)"

mtd4: 0fc00000 00020000 "file system(nand)"

 

root:/> mount -t jffs2 /dev/mtdblock4 /mnt/

bf5xx-nand bf5xx-nand.0: syndrome[0] 0x00295e00

bf5xx-nand bf5xx-nand.0: syndrome[1] 0x00000600

bf5xx-nand bf5xx-nand.0: syndrome[2] 0x00000000

bf5xx-nand bf5xx-nand.0: syndrome[3] 0x0000032b

bf5xx-nand bf5xx-nand.0: syndrome[4] 0x0000032b

bf5xx-nand bf5xx-nand.0: calced[0x001662cc], stored[0x003f3ccc]

bf5xx-nand bf5xx-nand.0: More than 1-bit error, non-correctable error.

bf5xx-nand bf5xx-nand.0: Please discard data, mark bad block

bf5xx-nand bf5xx-nand.0: syndrome[0] 0x00ab3f57

bf5xx-nand bf5xx-nand.0: syndrome[1] 0x00000757

bf5xx-nand bf5xx-nand.0: syndrome[2] 0x000007ff

bf5xx-nand bf5xx-nand.0: syndrome[3] 0x000005cf

bf5xx-nand bf5xx-nand.0: syndrome[4] 0x00000230

[snip]

 

If copy some data to nand flash in a HW-ECC enabled kernel, then switch to a SW-ECC enabled kernel, "mount" the partition will also fail with error.

 

Follow-ups

 

--- Yi Li                                                    2009-03-19 06:05:30

Error message I saw in the in a SW-ECC kernel, when mounting partition

containing data written in a HW-ECC kernel:

 

root:/> mount -t jffs2 /dev/mtdblock4 /mnt/

uncorrectable error : <3>uncorrectable error : <3>uncorrectable

error : <3>uncorrectable error : <4>mtd->read(0x400 bytes from

0xfb80000) returned ECC error

uncorrectable error : <3>uncorrectable error : <3>uncorrectable

error : <3>uncorrectable error : <3>uncorrectable error :

<3>uncorrectable error : <3>uncorrectable error :

<3>uncorrectable error : <3>uncorrectable error :

<3>uncorrectable error : <3>uncorrectable error :

<3>uncorrectable error : <3>uncorrectable error :

<3>uncorrectable error : <3>uncorrectable error :

<3>uncorrectable error : <3>uncorrectable error :

<3>uncorrectable error : <3>uncorrectable error :

<3>uncorrectable error : <3>uncorrectable error :

<3>uncorrectable error : <3>uncorrectable error :

<3>uncorrectable error : <3>uncorrectable error :

<3>uncorrectable error : <3>uncorrectable error :

<3>uncorrectable error : <3>uncorrectable error :

<3>uncorrectable error : <3>uncorrectable error :

<3>uncorrectable error : <3>uncorrectable error :

<3>uncorrectable error : <3>uncorrectable error :

<3>uncorrectable error : <3>uncorrectable error :

<3>uncorrectable error : <3>uncorrectable error :

<3>uncorrectable error : <3>uncorrectable error :

<3>uncorrectable error : <3>uncorrectable error :

<3>uncorrectable error : <3>uncorrectable error :

<3>uncorrectable error : <3>uncorrectable error :

<3>uncorrectable error : <3>uncorrectable error :

<3>uncorrectable error : <3>uncorrectable error :

<3>uncorrectable error : <3>

[snip]

 

--- Yi Li                                                    2009-03-19 06:06:03

Is this a feature of bug?

 

--- Mike Frysinger                                           2009-03-19 06:10:54

you're seeing correct behavior (and this is documented in the wiki).  flash

erase does not muck with blocks marked "bad", you need to use the nand

scrub feature in order to reset things.

 

i find it easiest to use "nand scrub" in u-boot to reset the OOB

regions when switching ECC layouts

 

--- Yi Li                                                    2009-03-19 06:12:04

Sorry. I mean. Is this expected or is it a bug? If SW ECC and HW ECC designed to

be different, just ignore this bug.

 

--- Yi Li                                                    2009-03-19 06:19:26

OK. Thanks Mike. My last comment conflict with yours in the air..

Close it.

 

--- Mike Frysinger                                           2009-03-19 06:22:07

we could (in theory), re-implement the algorithm that is found in our NFC when

the SW ECC option is enabled, but i think that'd be quite a bit of effort and

i'm not sure we'd really gain anything ...

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes