U-Boot OMAP GPMC ECC change

Colin Foster colin.foster at in-advantage.com
Wed May 17 21:39:52 CEST 2023


Hi Roger,

Thanks for the tests. I attached the files and commented in line... but
at the bottom of this email I have some findings...

On Wed, May 17, 2023 at 04:30:55PM +0300, Roger Quadros wrote:
> Hi Colin,
> 
> I just tested this on AM335x EVM which uses BCH8_CODE_HW but 8-bit NAND part.
> I see that you are using 16-bit NAND.
> 
> One more difference in u-boot configuration. For me:
> CONFIG_NAND_OMAP_GPMC_PREFETCH=y
> 
> Not sure if that matters but let's keep it set for now.
> 
> For debug can you please apply the patch (at end) to u-boot at commit a95410696d21
> (before breakage) and run the test.
> 
> Test procedure:
> 
> > nand dump 0

=> nand dump 0
Page 00000000 dump:
        40 00 00 00 0c 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 43 48 53 45  54 54 49 4e 47 53 00 00
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        c1 c0 c0 c0 00 01 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        dc 99 00 00 00 00 30 40  ff ff ff ea 1a 06 00 ea
        00 00 0f e1 1f 10 00 e2  1a 00 31 e3 1f 00 c0 13
        13 00 80 13 c0 00 80 e3  00 f0 29 e1 06 00 00 eb
        1d 00 00 eb 8a 06 00 eb  15 0f 07 ee 9a 0f 07 ee
        95 0f 07 ee 1e ff 2f e1  f0 ff ff ea 00 00 a0 e3
        17 0f 08 ee 15 0f 07 ee  d5 0f 07 ee 9a 0f 07 ee
        95 0f 07 ee 10 0f 11 ee  02 0a c0 e3 07 00 c0 e3
        02 00 80 e3 02 0b 80 e3  01 0a 80 e3 10 0f 01 ee
        0e 50 a0 e1 10 1f 10 ee  21 3a a0 e1 0f 30 03 e2
        0f 40 01 e2 03 22 a0 e1  02 20 84 e1 0c 00 9f e5
        07 00 c0 e3 00 d0 a0 e1  05 f0 a0 e1 64 06 00 ea
        00 df 30 40 06 4b 1b 68  1b 68 1b 68 1b 68 bf f3
        5f 8f 04 4a 03 f0 1f 03  52 f8 23 00 70 47 00 bf
        90 92 30 40 68 6f 30 40  01 4b 03 60 70 47 00 bf
        28 86 30 40 00 20 70 47  30 b5 47 4b 19 68 03 f1
        80 63 a3 f5 3b 43 99 42  79 d0 44 4a 91 42 0c bf
        4f f0 9e 32 4f f0 7c 32  bf f3 5f 8f 40 4b 18 68
        00 68 d0 f8 e4 00 02 60  bf f3 5f 8f 18 68 22 f4
        c0 24 00 68 d0 f8 e8 00  02 60 bf f3 5f 8f 18 68
        00 68 d0 f8 ec 00 04 60  bf f3 5f 8f 18 68 00 68
        d0 f8 f0 50 33 48 28 60  bf f3 5f 8f 1d 68 2d 68
        d5 f8 f4 50 2a 60 bf f3  5f 8f 1d 68 2d 68 d5 f8
        f8 50 2a 60 bf f3 5f 8f  1a 68 12 68 d2 f8 fc 20
        14 60 bf f3 5f 8f 1a 68  12 68 d2 f8 00 21 10 60
        1a 68 12 68 92 6c 12 68  bf f3 5f 8f 92 b2 92 b9
        bf f3 5f 8f 1a 68 12 68  d0 6c 1f 4a 02 60 bf f3
        5f 8f 18 68 00 68 00 6d  02 60 bf f3 5f 8f 18 68
        00 68 40 6d 02 60 1a 68  12 68 d2 f8 84 21 12 68
        bf f3 5f 8f 3a b9 bf f3  5f 8f 1a 68 13 48 12 68
        d2 f8 84 21 10 60 12 4a  91 42 0b d8 bf f3 5f 8f
        1b 68 10 4a 1b 68 d3 f8  88 31 1a 60 30 bd 4f f0
        1c 32 89 e7 1a 68 12 68  d2 f8 88 21 12 68 bf f3
        5f 8f 00 2a ea d0 f1 e7  00 bc 30 40 00 02 30 44
        90 92 30 40 0f 8c 88 a0  0f 04 01 04 10 01 4d 1c
        ff 00 60 44 00 40 08 99  08 b5 00 f0 50 fa 1f 4b
        98 42 a3 f5 6f 03 a3 f2  93 43 31 d0 0a d8 1c 4a
        90 42 19 d0 02 f5 80 12  01 32 90 42 17 d0 4f f0
        ff 32 12 e0 17 4a 90 42  f9 d1 17 4a 12 68 bf f3
        5f 8f 16 49 8a 42 1d d0  01 f1 00 51 a1 f5 1c 31
        8a 42 19 d0 12 4a 00 e0  12 4a 1a 60 08 bd 0e 4a
        12 68 bf f3 5f 8f 10 49  8a 42 05 d0 01 f1 80 51
        8a 42 03 d0 0d 4a f0 e7  0d 4a ee e7 0d 4a ec e7
        0d 4a ea e7 0d 4a e8 e7  0d 4a e6 e7 93 c0 1f 41
        91 c0 0f 41 9a c0 2f 41  04 22 00 4a 2f 50 97 0b
        00 01 60 44 00 01 30 44  2f c0 95 3b 00 02 30 44
        10 02 30 44 20 02 30 44  30 02 30 44 00 01 70 44
        10 01 60 44 10 4b 1a 68  12 68 d2 f8 30 21 12 68
        bf f3 5f 8f 22 f0 88 62  bf f3 5f 8f 19 68 09 68
        d1 f8 30 11 0a 60 1a 68  12 68 d2 f8 30 21 12 68
        bf f3 5f 8f 42 f0 8c 62  bf f3 5f 8f 1b 68 1b 68
        d3 f8 30 31 1a 60 70 47  90 92 30 40 00 b5 4f 4a
        9d b0 13 68 19 68 d1 f8  1c 13 01 91 19 68 d1 f8
        dc 12 02 91 19 68 d1 f8  38 12 03 91 19 68 d1 f8
        74 12 04 91 00 21 05 91  18 68 d0 f8 10 02 06 90
        18 68 d0 f8 44 02 07 90  18 68 d0 f8 48 02 08 90
        18 68 d0 f8 7c 02 09 90  18 68 d0 f8 14 04 0a 90
        18 68 d0 f8 44 03 0b 90  18 68 d0 f8 48 03 0c 90
        18 68 d0 f8 4c 03 0d 90  18 68 d0 f8 50 03 0e 90
        18 68 10 91 d0 f8 54 03  0f 90 18 68 d0 f8 18 04
        11 90 18 68 d0 f8 e0 02  12 90 18 68 d0 f8 e4 02
        13 90 18 68 d0 f8 30 03  14 90 18 68 d0 f8 10 04
        15 90 18 68 d0 f8 b8 03  16 90 18 68 d0 f8 64 03
        17 90 18 68 d0 f8 68 03  18 90 18 68 d0 f8 6c 03
        19 90 18 68 1b 91 d0 f8  70 03 1a 90 1b 68 01 a8
        d3 f8 4c 13 0b 68 43 f4  80 73 0b 60 13 68 1b 68
        d3 f8 e0 12 0b 68 43 f0  80 73 0b 60 13 68 1b 68
        d3 f8 e4 12 0b 68 43 f0  80 73 0b 60 13 68 1b 68
        d3 f8 18 14 0b 68 43 f0  80 73 0b 60 13 68 1b 68
        d3 f8 bc 14 0b 68 43 f4  80 73 0b 60 13 68 06 a9
        1b 68 d3 f8 e0 21 13 68  43 f4 80 73 13 60 01 23
        11 aa 00 f0 1f fd 1d b0  5d f8 04 fb bc 97 30 40
        08 b5 27 4a 27 4b 12 68  1b 68 27 49 1b 68 11 60
        26 4a 93 42 40 d0 0d d8  20 3a 93 42 34 d0 10 32
        93 42 39 d0 a2 f5 88 72  93 42 20 d0 20 48 02 f0
        09 fb 24 e0 1f 4a 93 42  06 d0 0d d8 1e 4a 93 42
        2a d0 1e 4a 93 42 f1 d1  1d 4b 1e 4a 1b 68 1a 60
        1d 4b 1e 4a 1b 68 11 e0  1d 4a 93 42 e6 d1 18 4b
        1c 4a 1b 68 1a 60 18 4b  1b 4a 1b 68 06 e0 14 4b
        1a 4a 1b 68 1a 60 14 4b  19 4a 1b 68 1a 60 19 4b
        19 4a 1b 68 1a 60 08 bd  0d 4b 18 4a 1b 68 1a 60
        0d 4b 17 4a 1b 68 f1 e7  09 4b 16 4a 1b 68 f6 e7
        bc 97 30 40 bc 70 30 40  88 72 30 40 20 02 30 44
        2d 86 30 40 10 01 60 44  30 02 30 44 00 01 60 44
        94 92 30 40 38 95 30 40  b8 97 30 40 58 95 30 40
        00 01 70 44 78 96 30 40  98 96 30 40 b8 92 30 40
        18 94 30 40 90 92 30 40  c0 70 30 40 d8 92 30 40
        f8 92 30 40 98 92 30 40  04 4b 18 68 bf f3 5f 8f
        20 f0 15 00 40 05 40 0d  70 47 00 bf 04 7b 30 4a
        70 47 00 00 10 b5 0f 4b  98 6a bf f3 5f 8f 0e 4b
        d9 f8 c4 20 a0 fb 03 01  b2 eb 51 2f 4f ea 51 24
        d9 f8 c4 10 d9 f8 c0 20  22 44 84 bf 02 f5 5a 22
        02 f5 e8 62 52 1a c9 f8  c0 20 c9 f8 c4 40 d9 f8
        c0 00 10 bd 00 20 03 48  b5 81 4e 1b bf f3 5f 8f
        00 20 03 4b d8 62 bf f3  5f 8f 2b 22 5a 62 70 47
        00 20 03 48 10 b5 04 46  ff f7 cc ff 00 1b 10 bd
        4f f4 96 53 58 43 09 4b  09 4a a0 fb 03 01 8b 09
OOB:
        ff ff c8 b0 e8 12 b2 4a
        63 70 83 0f c6 76 57 00
        0d 20 e0 06 66 b6 1a b4
        03 f7 8e d4 44 00 8d 04
        79 b3 3c e6 30 0f bf da
        d5 af 87 00 ef a4 e7 b4
        07 db 1e b0 1c 2d bc 31
        3b 00 ff ff ff ff ff ff

> 
> > mmc dev 0 
> 	#replace 0 with whatever points to SD-card

=> mmc dev 0
switch to partitions #0, OK
mmc0 is current device

> > nand read $loadaddr 0 800
> 	#loadaddr is any address in RAM which is free for use.

=> nand read $loadaddr 0 800

NAND read: device 0 offset 0x0, size 0x800
Scanning device for bad blocks
ecc: 0
ecc: 0
ecc: 0
ecc: 0
 2048 bytes read: OK

> > fatwrite mmc 0:1 $loadaddr nand.org 800

=> fatwrite mmc 0:1 $loadaddr nand.org 800
2048 bytes written in 3 ms (666 KiB/s)

> > fatload mmc 0:1 $loadaddr nand.org

=> fatload mmc 0:1 $loadaddr nand.org
2048 bytes read in 10 ms (199.2 KiB/s)

> > nand write $loadaddr 0 800

=> nand write $loadaddr 0 800

NAND write: device 0 offset 0x0, size 0x800
ecc: fc67657
ecc: f78ed444
ecc: dad5af87
ecc: 2dbc313b
ecc: 0
ecc: 0
ecc: 0
ecc: 0
 2048 bytes written: OK


> Now please run the below test on the offending commit 04fcd25873 after applying
> the patch (at end).

> > nand dump 0

=> nand dump 0
Page 00000000 dump:
        40 00 00 00 0c 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 43 48 53 45  54 54 49 4e 47 53 00 00
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        c1 c0 c0 c0 00 01 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        dc 99 00 00 00 00 30 40  ff ff ff ea 1a 06 00 ea
        00 00 0f e1 1f 10 00 e2  1a 00 31 e3 1f 00 c0 13
        13 00 80 13 c0 00 80 e3  00 f0 29 e1 06 00 00 eb
        1d 00 00 eb 8a 06 00 eb  15 0f 07 ee 9a 0f 07 ee
        95 0f 07 ee 1e ff 2f e1  f0 ff ff ea 00 00 a0 e3
        17 0f 08 ee 15 0f 07 ee  d5 0f 07 ee 9a 0f 07 ee
        95 0f 07 ee 10 0f 11 ee  02 0a c0 e3 07 00 c0 e3
        02 00 80 e3 02 0b 80 e3  01 0a 80 e3 10 0f 01 ee
        0e 50 a0 e1 10 1f 10 ee  21 3a a0 e1 0f 30 03 e2
        0f 40 01 e2 03 22 a0 e1  02 20 84 e1 0c 00 9f e5
        07 00 c0 e3 00 d0 a0 e1  05 f0 a0 e1 64 06 00 ea
        00 df 30 40 06 4b 1b 68  1b 68 1b 68 1b 68 bf f3
        5f 8f 04 4a 03 f0 1f 03  52 f8 23 00 70 47 00 bf
        90 92 30 40 68 6f 30 40  01 4b 03 60 70 47 00 bf
        28 86 30 40 00 20 70 47  30 b5 47 4b 19 68 03 f1
        80 63 a3 f5 3b 43 99 42  79 d0 44 4a 91 42 0c bf
        4f f0 9e 32 4f f0 7c 32  bf f3 5f 8f 40 4b 18 68
        00 68 d0 f8 e4 00 02 60  bf f3 5f 8f 18 68 22 f4
        c0 24 00 68 d0 f8 e8 00  02 60 bf f3 5f 8f 18 68
        00 68 d0 f8 ec 00 04 60  bf f3 5f 8f 18 68 00 68
        d0 f8 f0 50 33 48 28 60  bf f3 5f 8f 1d 68 2d 68
        d5 f8 f4 50 2a 60 bf f3  5f 8f 1d 68 2d 68 d5 f8
        f8 50 2a 60 bf f3 5f 8f  1a 68 12 68 d2 f8 fc 20
        14 60 bf f3 5f 8f 1a 68  12 68 d2 f8 00 21 10 60
        1a 68 12 68 92 6c 12 68  bf f3 5f 8f 92 b2 92 b9
        bf f3 5f 8f 1a 68 12 68  d0 6c 1f 4a 02 60 bf f3
        5f 8f 18 68 00 68 00 6d  02 60 bf f3 5f 8f 18 68
        00 68 40 6d 02 60 1a 68  12 68 d2 f8 84 21 12 68
        bf f3 5f 8f 3a b9 bf f3  5f 8f 1a 68 13 48 12 68
        d2 f8 84 21 10 60 12 4a  91 42 0b d8 bf f3 5f 8f
        1b 68 10 4a 1b 68 d3 f8  88 31 1a 60 30 bd 4f f0
        1c 32 89 e7 1a 68 12 68  d2 f8 88 21 12 68 bf f3
        5f 8f 00 2a ea d0 f1 e7  00 bc 30 40 00 02 30 44
        90 92 30 40 0f 8c 88 a0  0f 04 01 04 10 01 4d 1c
        ff 00 60 44 00 40 08 99  08 b5 00 f0 50 fa 1f 4b
        98 42 a3 f5 6f 03 a3 f2  93 43 31 d0 0a d8 1c 4a
        90 42 19 d0 02 f5 80 12  01 32 90 42 17 d0 4f f0
        ff 32 12 e0 17 4a 90 42  f9 d1 17 4a 12 68 bf f3
        5f 8f 16 49 8a 42 1d d0  01 f1 00 51 a1 f5 1c 31
        8a 42 19 d0 12 4a 00 e0  12 4a 1a 60 08 bd 0e 4a
        12 68 bf f3 5f 8f 10 49  8a 42 05 d0 01 f1 80 51
        8a 42 03 d0 0d 4a f0 e7  0d 4a ee e7 0d 4a ec e7
        0d 4a ea e7 0d 4a e8 e7  0d 4a e6 e7 93 c0 1f 41
        91 c0 0f 41 9a c0 2f 41  04 22 00 4a 2f 50 97 0b
        00 01 60 44 00 01 30 44  2f c0 95 3b 00 02 30 44
        10 02 30 44 20 02 30 44  30 02 30 44 00 01 70 44
        10 01 60 44 10 4b 1a 68  12 68 d2 f8 30 21 12 68
        bf f3 5f 8f 22 f0 88 62  bf f3 5f 8f 19 68 09 68
        d1 f8 30 11 0a 60 1a 68  12 68 d2 f8 30 21 12 68
        bf f3 5f 8f 42 f0 8c 62  bf f3 5f 8f 1b 68 1b 68
        d3 f8 30 31 1a 60 70 47  90 92 30 40 00 b5 4f 4a
        9d b0 13 68 19 68 d1 f8  1c 13 01 91 19 68 d1 f8
        dc 12 02 91 19 68 d1 f8  38 12 03 91 19 68 d1 f8
        74 12 04 91 00 21 05 91  18 68 d0 f8 10 02 06 90
        18 68 d0 f8 44 02 07 90  18 68 d0 f8 48 02 08 90
        18 68 d0 f8 7c 02 09 90  18 68 d0 f8 14 04 0a 90
        18 68 d0 f8 44 03 0b 90  18 68 d0 f8 48 03 0c 90
        18 68 d0 f8 4c 03 0d 90  18 68 d0 f8 50 03 0e 90
        18 68 10 91 d0 f8 54 03  0f 90 18 68 d0 f8 18 04
        11 90 18 68 d0 f8 e0 02  12 90 18 68 d0 f8 e4 02
        13 90 18 68 d0 f8 30 03  14 90 18 68 d0 f8 10 04
        15 90 18 68 d0 f8 b8 03  16 90 18 68 d0 f8 64 03
        17 90 18 68 d0 f8 68 03  18 90 18 68 d0 f8 6c 03
        19 90 18 68 1b 91 d0 f8  70 03 1a 90 1b 68 01 a8
        d3 f8 4c 13 0b 68 43 f4  80 73 0b 60 13 68 1b 68
        d3 f8 e0 12 0b 68 43 f0  80 73 0b 60 13 68 1b 68
        d3 f8 e4 12 0b 68 43 f0  80 73 0b 60 13 68 1b 68
        d3 f8 18 14 0b 68 43 f0  80 73 0b 60 13 68 1b 68
        d3 f8 bc 14 0b 68 43 f4  80 73 0b 60 13 68 06 a9
        1b 68 d3 f8 e0 21 13 68  43 f4 80 73 13 60 01 23
        11 aa 00 f0 1f fd 1d b0  5d f8 04 fb bc 97 30 40
        08 b5 27 4a 27 4b 12 68  1b 68 27 49 1b 68 11 60
        26 4a 93 42 40 d0 0d d8  20 3a 93 42 34 d0 10 32
        93 42 39 d0 a2 f5 88 72  93 42 20 d0 20 48 02 f0
        09 fb 24 e0 1f 4a 93 42  06 d0 0d d8 1e 4a 93 42
        2a d0 1e 4a 93 42 f1 d1  1d 4b 1e 4a 1b 68 1a 60
        1d 4b 1e 4a 1b 68 11 e0  1d 4a 93 42 e6 d1 18 4b
        1c 4a 1b 68 1a 60 18 4b  1b 4a 1b 68 06 e0 14 4b
        1a 4a 1b 68 1a 60 14 4b  19 4a 1b 68 1a 60 19 4b
        19 4a 1b 68 1a 60 08 bd  0d 4b 18 4a 1b 68 1a 60
        0d 4b 17 4a 1b 68 f1 e7  09 4b 16 4a 1b 68 f6 e7
        bc 97 30 40 bc 70 30 40  88 72 30 40 20 02 30 44
        2d 86 30 40 10 01 60 44  30 02 30 44 00 01 60 44
        94 92 30 40 38 95 30 40  b8 97 30 40 58 95 30 40
        00 01 70 44 78 96 30 40  98 96 30 40 b8 92 30 40
        18 94 30 40 90 92 30 40  c0 70 30 40 d8 92 30 40
        f8 92 30 40 98 92 30 40  04 4b 18 68 bf f3 5f 8f
        20 f0 15 00 40 05 40 0d  70 47 00 bf 04 7b 30 4a
        70 47 00 00 10 b5 0f 4b  98 6a bf f3 5f 8f 0e 4b
        d9 f8 c4 20 a0 fb 03 01  b2 eb 51 2f 4f ea 51 24
        d9 f8 c4 10 d9 f8 c0 20  22 44 84 bf 02 f5 5a 22
        02 f5 e8 62 52 1a c9 f8  c0 20 c9 f8 c4 40 d9 f8
        c0 00 10 bd 00 20 03 48  b5 81 4e 1b bf f3 5f 8f
        00 20 03 4b d8 62 bf f3  5f 8f 2b 22 5a 62 70 47
        00 20 03 48 10 b5 04 46  ff f7 cc ff 00 1b 10 bd
        4f f4 96 53 58 43 09 4b  09 4a a0 fb 03 01 8b 09
OOB:
        ff ff c8 b0 e8 12 b2 4a
        63 70 83 0f c6 76 57 00
        0d 20 e0 06 66 b6 1a b4
        03 f7 8e d4 44 00 8d 04
        79 b3 3c e6 30 0f bf da
        d5 af 87 00 ef a4 e7 b4
        07 db 1e b0 1c 2d bc 31
        3b 00 ff ff ff ff ff ff

> > mmc dev 0
> 	#replace 0 with whatever points to SD-card

=> mmc dev 0
switch to partitions #0, OK
mmc0 is current device


""" NOTE """
# Here I did a nand read, and re-write to the "nand.post" file. It
# shouldn't affect the results, but I kept the commands and output for
# transparency.


=> nand read $loadaddr 0 800

NAND read: device 0 offset 0x0, size 0x800
Scanning device for bad blocks
ecc: 0
ecc: 0
ecc: 0
ecc: 0
 2048 bytes read: OK
=> fatwrite mmc 0:1 $loadaddr nand.post 800
2048 bytes written in 3 ms (666 KiB/s)

> > fatload mmc 0:1 $loadaddr nand.org

=> fatload mmc 0:1 $loadaddr nand.org
2048 bytes read in 10 ms (199.2 KiB/s)


> > nand write $loadaddr 0 800

=> nand write $loadaddr 0 800

NAND write: device 0 offset 0x0, size 0x800
ecc: fc67657
ecc: f78ed444
ecc: dad5af87
ecc: 2dbc313b
ecc: 0
ecc: 0
ecc: 0
ecc: 0
 2048 bytes written: OK


> Please send me the logs of both tests and the nand.org file so I can try it out here. Thanks!

All are attached.

However I have some other initial findings:

I swapped in just U-Boot (not the SPL) with your patch, and everything
seems to work!

The issue of Uncorrectable ECC errors spam came from the SPL. Here's a
snippet of the boot log with the "ecc" print as well as your patch:

U-Boot SPL 2023.04-00029-g26a9ce5314-dirty (May 17 2023 - 12:06:49 -0700)
OMAP4460-GP ES1.1
Trying to boot from NAND
ecc: 2420106
ecc: ebd922f6
ecc: 333f844f
ecc: ab812f72
omap-elm: uncorrectable ECC errors
omap-elm: uncorrectable ECC errors
omap-elm: uncorrectable ECC errors
omap-elm: uncorrectable ECC errors
ecc: 2420106
ecc: ebd922f6
ecc: 333f844f
ecc: ab812f72
omap-elm: uncorrectable ECC errors
omap-elm: uncorrectable ECC errors
omap-elm: uncorrectable ECC errors
omap-elm: uncorrectable ECC errors


Historically when I saw "uncorrectable ECC errors" that meant I should
grab a cup of coffee, problems were going to happen. However, in this
scenario, if I let the SPL spew the ECC error prints, it eventually
loads U-Boot from NAND. And U-Boot successfully loads the kernel, DTB,
and boots the filesystem (with the "ecc: %x" prints slowing things down
right now)


Here's where U-Boot loads the DTB:

Loading file 'boot/omap4-ia-decoder-card.dtb' to addr 0x88000000...
ecc: 0
... Repeated over and over ...
ecc: 0
Done
Unmounting UBIFS volume rootfs-a!



So I'm thinking either:

1. I'm doing something horribly wrong and have been getting away with
it. The patch simply highlights this. Or...

2. There's an issue with how the SPL is determining ECC errors, and it
is incorrectly reporting errors.


I hope this information is useful, and let me know if there are any
other tests I can run.


Many thanks,

Colin Foster
-------------- next part --------------
U-Boot SPL 2023.04-00029-g26a9ce5314 (May 17 2023 - 09:59:34 -0700)
OMAP4460-GP ES1.1
Trying to boot from MMC1


U-Boot 2023.04-00029-g26a9ce5314-dirty (May 17 2023 - 10:04:13 -0700)

CPU  : OMAP4460-GP ES1.1
Model: Phytec PCM-959 Eval Board
Board: OMAP4 PCM959
DRAM:  1 GiB
Core:  110 devices, 10 uclasses, devicetree: separate
NAND:  device found, Manufacturer ID: 0x2c, Chip ID: 0xb3
Micron MT29F8G16ADBDAH4
1024 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
1024 MiB
MMC:   OMAP SD/MMC: 0
Loading Environment from FAT... *** Error - No Valid Environment Area found
*** Warning - bad env area, using default environment

Net:   No ethernet found.
Hit any key to stop autoboot:  0
=> nand dump 0
Page 00000000 dump:
        40 00 00 00 0c 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 43 48 53 45  54 54 49 4e 47 53 00 00
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        c1 c0 c0 c0 00 01 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        dc 99 00 00 00 00 30 40  ff ff ff ea 1a 06 00 ea
        00 00 0f e1 1f 10 00 e2  1a 00 31 e3 1f 00 c0 13
        13 00 80 13 c0 00 80 e3  00 f0 29 e1 06 00 00 eb
        1d 00 00 eb 8a 06 00 eb  15 0f 07 ee 9a 0f 07 ee
        95 0f 07 ee 1e ff 2f e1  f0 ff ff ea 00 00 a0 e3
        17 0f 08 ee 15 0f 07 ee  d5 0f 07 ee 9a 0f 07 ee
        95 0f 07 ee 10 0f 11 ee  02 0a c0 e3 07 00 c0 e3
        02 00 80 e3 02 0b 80 e3  01 0a 80 e3 10 0f 01 ee
        0e 50 a0 e1 10 1f 10 ee  21 3a a0 e1 0f 30 03 e2
        0f 40 01 e2 03 22 a0 e1  02 20 84 e1 0c 00 9f e5
        07 00 c0 e3 00 d0 a0 e1  05 f0 a0 e1 64 06 00 ea
        00 df 30 40 06 4b 1b 68  1b 68 1b 68 1b 68 bf f3
        5f 8f 04 4a 03 f0 1f 03  52 f8 23 00 70 47 00 bf
        90 92 30 40 68 6f 30 40  01 4b 03 60 70 47 00 bf
        28 86 30 40 00 20 70 47  30 b5 47 4b 19 68 03 f1
        80 63 a3 f5 3b 43 99 42  79 d0 44 4a 91 42 0c bf
        4f f0 9e 32 4f f0 7c 32  bf f3 5f 8f 40 4b 18 68
        00 68 d0 f8 e4 00 02 60  bf f3 5f 8f 18 68 22 f4
        c0 24 00 68 d0 f8 e8 00  02 60 bf f3 5f 8f 18 68
        00 68 d0 f8 ec 00 04 60  bf f3 5f 8f 18 68 00 68
        d0 f8 f0 50 33 48 28 60  bf f3 5f 8f 1d 68 2d 68
        d5 f8 f4 50 2a 60 bf f3  5f 8f 1d 68 2d 68 d5 f8
        f8 50 2a 60 bf f3 5f 8f  1a 68 12 68 d2 f8 fc 20
        14 60 bf f3 5f 8f 1a 68  12 68 d2 f8 00 21 10 60
        1a 68 12 68 92 6c 12 68  bf f3 5f 8f 92 b2 92 b9
        bf f3 5f 8f 1a 68 12 68  d0 6c 1f 4a 02 60 bf f3
        5f 8f 18 68 00 68 00 6d  02 60 bf f3 5f 8f 18 68
        00 68 40 6d 02 60 1a 68  12 68 d2 f8 84 21 12 68
        bf f3 5f 8f 3a b9 bf f3  5f 8f 1a 68 13 48 12 68
        d2 f8 84 21 10 60 12 4a  91 42 0b d8 bf f3 5f 8f
        1b 68 10 4a 1b 68 d3 f8  88 31 1a 60 30 bd 4f f0
        1c 32 89 e7 1a 68 12 68  d2 f8 88 21 12 68 bf f3
        5f 8f 00 2a ea d0 f1 e7  00 bc 30 40 00 02 30 44
        90 92 30 40 0f 8c 88 a0  0f 04 01 04 10 01 4d 1c
        ff 00 60 44 00 40 08 99  08 b5 00 f0 50 fa 1f 4b
        98 42 a3 f5 6f 03 a3 f2  93 43 31 d0 0a d8 1c 4a
        90 42 19 d0 02 f5 80 12  01 32 90 42 17 d0 4f f0
        ff 32 12 e0 17 4a 90 42  f9 d1 17 4a 12 68 bf f3
        5f 8f 16 49 8a 42 1d d0  01 f1 00 51 a1 f5 1c 31
        8a 42 19 d0 12 4a 00 e0  12 4a 1a 60 08 bd 0e 4a
        12 68 bf f3 5f 8f 10 49  8a 42 05 d0 01 f1 80 51
        8a 42 03 d0 0d 4a f0 e7  0d 4a ee e7 0d 4a ec e7
        0d 4a ea e7 0d 4a e8 e7  0d 4a e6 e7 93 c0 1f 41
        91 c0 0f 41 9a c0 2f 41  04 22 00 4a 2f 50 97 0b
        00 01 60 44 00 01 30 44  2f c0 95 3b 00 02 30 44
        10 02 30 44 20 02 30 44  30 02 30 44 00 01 70 44
        10 01 60 44 10 4b 1a 68  12 68 d2 f8 30 21 12 68
        bf f3 5f 8f 22 f0 88 62  bf f3 5f 8f 19 68 09 68
        d1 f8 30 11 0a 60 1a 68  12 68 d2 f8 30 21 12 68
        bf f3 5f 8f 42 f0 8c 62  bf f3 5f 8f 1b 68 1b 68
        d3 f8 30 31 1a 60 70 47  90 92 30 40 00 b5 4f 4a
        9d b0 13 68 19 68 d1 f8  1c 13 01 91 19 68 d1 f8
        dc 12 02 91 19 68 d1 f8  38 12 03 91 19 68 d1 f8
        74 12 04 91 00 21 05 91  18 68 d0 f8 10 02 06 90
        18 68 d0 f8 44 02 07 90  18 68 d0 f8 48 02 08 90
        18 68 d0 f8 7c 02 09 90  18 68 d0 f8 14 04 0a 90
        18 68 d0 f8 44 03 0b 90  18 68 d0 f8 48 03 0c 90
        18 68 d0 f8 4c 03 0d 90  18 68 d0 f8 50 03 0e 90
        18 68 10 91 d0 f8 54 03  0f 90 18 68 d0 f8 18 04
        11 90 18 68 d0 f8 e0 02  12 90 18 68 d0 f8 e4 02
        13 90 18 68 d0 f8 30 03  14 90 18 68 d0 f8 10 04
        15 90 18 68 d0 f8 b8 03  16 90 18 68 d0 f8 64 03
        17 90 18 68 d0 f8 68 03  18 90 18 68 d0 f8 6c 03
        19 90 18 68 1b 91 d0 f8  70 03 1a 90 1b 68 01 a8
        d3 f8 4c 13 0b 68 43 f4  80 73 0b 60 13 68 1b 68
        d3 f8 e0 12 0b 68 43 f0  80 73 0b 60 13 68 1b 68
        d3 f8 e4 12 0b 68 43 f0  80 73 0b 60 13 68 1b 68
        d3 f8 18 14 0b 68 43 f0  80 73 0b 60 13 68 1b 68
        d3 f8 bc 14 0b 68 43 f4  80 73 0b 60 13 68 06 a9
        1b 68 d3 f8 e0 21 13 68  43 f4 80 73 13 60 01 23
        11 aa 00 f0 1f fd 1d b0  5d f8 04 fb bc 97 30 40
        08 b5 27 4a 27 4b 12 68  1b 68 27 49 1b 68 11 60
        26 4a 93 42 40 d0 0d d8  20 3a 93 42 34 d0 10 32
        93 42 39 d0 a2 f5 88 72  93 42 20 d0 20 48 02 f0
        09 fb 24 e0 1f 4a 93 42  06 d0 0d d8 1e 4a 93 42
        2a d0 1e 4a 93 42 f1 d1  1d 4b 1e 4a 1b 68 1a 60
        1d 4b 1e 4a 1b 68 11 e0  1d 4a 93 42 e6 d1 18 4b
        1c 4a 1b 68 1a 60 18 4b  1b 4a 1b 68 06 e0 14 4b
        1a 4a 1b 68 1a 60 14 4b  19 4a 1b 68 1a 60 19 4b
        19 4a 1b 68 1a 60 08 bd  0d 4b 18 4a 1b 68 1a 60
        0d 4b 17 4a 1b 68 f1 e7  09 4b 16 4a 1b 68 f6 e7
        bc 97 30 40 bc 70 30 40  88 72 30 40 20 02 30 44
        2d 86 30 40 10 01 60 44  30 02 30 44 00 01 60 44
        94 92 30 40 38 95 30 40  b8 97 30 40 58 95 30 40
        00 01 70 44 78 96 30 40  98 96 30 40 b8 92 30 40
        18 94 30 40 90 92 30 40  c0 70 30 40 d8 92 30 40
        f8 92 30 40 98 92 30 40  04 4b 18 68 bf f3 5f 8f
        20 f0 15 00 40 05 40 0d  70 47 00 bf 04 7b 30 4a
        70 47 00 00 10 b5 0f 4b  98 6a bf f3 5f 8f 0e 4b
        d9 f8 c4 20 a0 fb 03 01  b2 eb 51 2f 4f ea 51 24
        d9 f8 c4 10 d9 f8 c0 20  22 44 84 bf 02 f5 5a 22
        02 f5 e8 62 52 1a c9 f8  c0 20 c9 f8 c4 40 d9 f8
        c0 00 10 bd 00 20 03 48  b5 81 4e 1b bf f3 5f 8f
        00 20 03 4b d8 62 bf f3  5f 8f 2b 22 5a 62 70 47
        00 20 03 48 10 b5 04 46  ff f7 cc ff 00 1b 10 bd
        4f f4 96 53 58 43 09 4b  09 4a a0 fb 03 01 8b 09
OOB:
        ff ff c8 b0 e8 12 b2 4a
        63 70 83 0f c6 76 57 00
        0d 20 e0 06 66 b6 1a b4
        03 f7 8e d4 44 00 8d 04
        79 b3 3c e6 30 0f bf da
        d5 af 87 00 ef a4 e7 b4
        07 db 1e b0 1c 2d bc 31
        3b 00 ff ff ff ff ff ff
=> mmc dev 0
switch to partitions #0, OK
mmc0 is current device
=> nand read $loadaddr 0 800

NAND read: device 0 offset 0x0, size 0x800
Scanning device for bad blocks
ecc: 0
ecc: 0
ecc: 0
ecc: 0
 2048 bytes read: OK
=> fatwrite mmc 0:1 $loadaddr nand.org 800
2048 bytes written in 3 ms (666 KiB/s)
=> fatload mmc 0:1 $loadaddr nand.org
2048 bytes read in 10 ms (199.2 KiB/s)
=> nand write $loadaddr 0 800

NAND write: device 0 offset 0x0, size 0x800
ecc: fc67657
ecc: f78ed444
ecc: dad5af87
ecc: 2dbc313b
ecc: 0
ecc: 0
ecc: 0
ecc: 0
 2048 bytes written: OK
=>
=>
=>
U-Boot SPL 2023.04-00029-g26a9ce5314 (May 17 2023 - 09:59:34 -0700)
OMAP4460-GP ES1.1
Trying to boot from MMC1


U-Boot 2023.04-00029-g26a9ce5314-dirty (May 17 2023 - 10:12:21 -0700)

CPU  : OMAP4460-GP ES1.1
Model: Phytec PCM-959 Eval Board
Board: OMAP4 PCM959
DRAM:  1 GiB
Core:  110 devices, 10 uclasses, devicetree: separate
NAND:  device found, Manufacturer ID: 0x2c, Chip ID: 0xb3
Micron MT29F8G16ADBDAH4
1024 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
1024 MiB
MMC:   OMAP SD/MMC: 0
Loading Environment from FAT... *** Error - No Valid Environment Area found
*** Warning - bad env area, using default environment

Net:   No ethernet found.
Hit any key to stop autoboot:  0
=>
=> nand dump 0
Page 00000000 dump:
        40 00 00 00 0c 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 43 48 53 45  54 54 49 4e 47 53 00 00
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
        c1 c0 c0 c0 00 01 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
        dc 99 00 00 00 00 30 40  ff ff ff ea 1a 06 00 ea
        00 00 0f e1 1f 10 00 e2  1a 00 31 e3 1f 00 c0 13
        13 00 80 13 c0 00 80 e3  00 f0 29 e1 06 00 00 eb
        1d 00 00 eb 8a 06 00 eb  15 0f 07 ee 9a 0f 07 ee
        95 0f 07 ee 1e ff 2f e1  f0 ff ff ea 00 00 a0 e3
        17 0f 08 ee 15 0f 07 ee  d5 0f 07 ee 9a 0f 07 ee
        95 0f 07 ee 10 0f 11 ee  02 0a c0 e3 07 00 c0 e3
        02 00 80 e3 02 0b 80 e3  01 0a 80 e3 10 0f 01 ee
        0e 50 a0 e1 10 1f 10 ee  21 3a a0 e1 0f 30 03 e2
        0f 40 01 e2 03 22 a0 e1  02 20 84 e1 0c 00 9f e5
        07 00 c0 e3 00 d0 a0 e1  05 f0 a0 e1 64 06 00 ea
        00 df 30 40 06 4b 1b 68  1b 68 1b 68 1b 68 bf f3
        5f 8f 04 4a 03 f0 1f 03  52 f8 23 00 70 47 00 bf
        90 92 30 40 68 6f 30 40  01 4b 03 60 70 47 00 bf
        28 86 30 40 00 20 70 47  30 b5 47 4b 19 68 03 f1
        80 63 a3 f5 3b 43 99 42  79 d0 44 4a 91 42 0c bf
        4f f0 9e 32 4f f0 7c 32  bf f3 5f 8f 40 4b 18 68
        00 68 d0 f8 e4 00 02 60  bf f3 5f 8f 18 68 22 f4
        c0 24 00 68 d0 f8 e8 00  02 60 bf f3 5f 8f 18 68
        00 68 d0 f8 ec 00 04 60  bf f3 5f 8f 18 68 00 68
        d0 f8 f0 50 33 48 28 60  bf f3 5f 8f 1d 68 2d 68
        d5 f8 f4 50 2a 60 bf f3  5f 8f 1d 68 2d 68 d5 f8
        f8 50 2a 60 bf f3 5f 8f  1a 68 12 68 d2 f8 fc 20
        14 60 bf f3 5f 8f 1a 68  12 68 d2 f8 00 21 10 60
        1a 68 12 68 92 6c 12 68  bf f3 5f 8f 92 b2 92 b9
        bf f3 5f 8f 1a 68 12 68  d0 6c 1f 4a 02 60 bf f3
        5f 8f 18 68 00 68 00 6d  02 60 bf f3 5f 8f 18 68
        00 68 40 6d 02 60 1a 68  12 68 d2 f8 84 21 12 68
        bf f3 5f 8f 3a b9 bf f3  5f 8f 1a 68 13 48 12 68
        d2 f8 84 21 10 60 12 4a  91 42 0b d8 bf f3 5f 8f
        1b 68 10 4a 1b 68 d3 f8  88 31 1a 60 30 bd 4f f0
        1c 32 89 e7 1a 68 12 68  d2 f8 88 21 12 68 bf f3
        5f 8f 00 2a ea d0 f1 e7  00 bc 30 40 00 02 30 44
        90 92 30 40 0f 8c 88 a0  0f 04 01 04 10 01 4d 1c
        ff 00 60 44 00 40 08 99  08 b5 00 f0 50 fa 1f 4b
        98 42 a3 f5 6f 03 a3 f2  93 43 31 d0 0a d8 1c 4a
        90 42 19 d0 02 f5 80 12  01 32 90 42 17 d0 4f f0
        ff 32 12 e0 17 4a 90 42  f9 d1 17 4a 12 68 bf f3
        5f 8f 16 49 8a 42 1d d0  01 f1 00 51 a1 f5 1c 31
        8a 42 19 d0 12 4a 00 e0  12 4a 1a 60 08 bd 0e 4a
        12 68 bf f3 5f 8f 10 49  8a 42 05 d0 01 f1 80 51
        8a 42 03 d0 0d 4a f0 e7  0d 4a ee e7 0d 4a ec e7
        0d 4a ea e7 0d 4a e8 e7  0d 4a e6 e7 93 c0 1f 41
        91 c0 0f 41 9a c0 2f 41  04 22 00 4a 2f 50 97 0b
        00 01 60 44 00 01 30 44  2f c0 95 3b 00 02 30 44
        10 02 30 44 20 02 30 44  30 02 30 44 00 01 70 44
        10 01 60 44 10 4b 1a 68  12 68 d2 f8 30 21 12 68
        bf f3 5f 8f 22 f0 88 62  bf f3 5f 8f 19 68 09 68
        d1 f8 30 11 0a 60 1a 68  12 68 d2 f8 30 21 12 68
        bf f3 5f 8f 42 f0 8c 62  bf f3 5f 8f 1b 68 1b 68
        d3 f8 30 31 1a 60 70 47  90 92 30 40 00 b5 4f 4a
        9d b0 13 68 19 68 d1 f8  1c 13 01 91 19 68 d1 f8
        dc 12 02 91 19 68 d1 f8  38 12 03 91 19 68 d1 f8
        74 12 04 91 00 21 05 91  18 68 d0 f8 10 02 06 90
        18 68 d0 f8 44 02 07 90  18 68 d0 f8 48 02 08 90
        18 68 d0 f8 7c 02 09 90  18 68 d0 f8 14 04 0a 90
        18 68 d0 f8 44 03 0b 90  18 68 d0 f8 48 03 0c 90
        18 68 d0 f8 4c 03 0d 90  18 68 d0 f8 50 03 0e 90
        18 68 10 91 d0 f8 54 03  0f 90 18 68 d0 f8 18 04
        11 90 18 68 d0 f8 e0 02  12 90 18 68 d0 f8 e4 02
        13 90 18 68 d0 f8 30 03  14 90 18 68 d0 f8 10 04
        15 90 18 68 d0 f8 b8 03  16 90 18 68 d0 f8 64 03
        17 90 18 68 d0 f8 68 03  18 90 18 68 d0 f8 6c 03
        19 90 18 68 1b 91 d0 f8  70 03 1a 90 1b 68 01 a8
        d3 f8 4c 13 0b 68 43 f4  80 73 0b 60 13 68 1b 68
        d3 f8 e0 12 0b 68 43 f0  80 73 0b 60 13 68 1b 68
        d3 f8 e4 12 0b 68 43 f0  80 73 0b 60 13 68 1b 68
        d3 f8 18 14 0b 68 43 f0  80 73 0b 60 13 68 1b 68
        d3 f8 bc 14 0b 68 43 f4  80 73 0b 60 13 68 06 a9
        1b 68 d3 f8 e0 21 13 68  43 f4 80 73 13 60 01 23
        11 aa 00 f0 1f fd 1d b0  5d f8 04 fb bc 97 30 40
        08 b5 27 4a 27 4b 12 68  1b 68 27 49 1b 68 11 60
        26 4a 93 42 40 d0 0d d8  20 3a 93 42 34 d0 10 32
        93 42 39 d0 a2 f5 88 72  93 42 20 d0 20 48 02 f0
        09 fb 24 e0 1f 4a 93 42  06 d0 0d d8 1e 4a 93 42
        2a d0 1e 4a 93 42 f1 d1  1d 4b 1e 4a 1b 68 1a 60
        1d 4b 1e 4a 1b 68 11 e0  1d 4a 93 42 e6 d1 18 4b
        1c 4a 1b 68 1a 60 18 4b  1b 4a 1b 68 06 e0 14 4b
        1a 4a 1b 68 1a 60 14 4b  19 4a 1b 68 1a 60 19 4b
        19 4a 1b 68 1a 60 08 bd  0d 4b 18 4a 1b 68 1a 60
        0d 4b 17 4a 1b 68 f1 e7  09 4b 16 4a 1b 68 f6 e7
        bc 97 30 40 bc 70 30 40  88 72 30 40 20 02 30 44
        2d 86 30 40 10 01 60 44  30 02 30 44 00 01 60 44
        94 92 30 40 38 95 30 40  b8 97 30 40 58 95 30 40
        00 01 70 44 78 96 30 40  98 96 30 40 b8 92 30 40
        18 94 30 40 90 92 30 40  c0 70 30 40 d8 92 30 40
        f8 92 30 40 98 92 30 40  04 4b 18 68 bf f3 5f 8f
        20 f0 15 00 40 05 40 0d  70 47 00 bf 04 7b 30 4a
        70 47 00 00 10 b5 0f 4b  98 6a bf f3 5f 8f 0e 4b
        d9 f8 c4 20 a0 fb 03 01  b2 eb 51 2f 4f ea 51 24
        d9 f8 c4 10 d9 f8 c0 20  22 44 84 bf 02 f5 5a 22
        02 f5 e8 62 52 1a c9 f8  c0 20 c9 f8 c4 40 d9 f8
        c0 00 10 bd 00 20 03 48  b5 81 4e 1b bf f3 5f 8f
        00 20 03 4b d8 62 bf f3  5f 8f 2b 22 5a 62 70 47
        00 20 03 48 10 b5 04 46  ff f7 cc ff 00 1b 10 bd
        4f f4 96 53 58 43 09 4b  09 4a a0 fb 03 01 8b 09
OOB:
        ff ff c8 b0 e8 12 b2 4a
        63 70 83 0f c6 76 57 00
        0d 20 e0 06 66 b6 1a b4
        03 f7 8e d4 44 00 8d 04
        79 b3 3c e6 30 0f bf da
        d5 af 87 00 ef a4 e7 b4
        07 db 1e b0 1c 2d bc 31
        3b 00 ff ff ff ff ff ff
=> mmc dev 0
switch to partitions #0, OK
mmc0 is current device
=> nand read $loadaddr 0 800

NAND read: device 0 offset 0x0, size 0x800
Scanning device for bad blocks
ecc: 0
ecc: 0
ecc: 0
ecc: 0
 2048 bytes read: OK
=> fatwrite mmc 0:1 $loadaddr nand.post 800
2048 bytes written in 3 ms (666 KiB/s)
=> fatload mmc 0:1 $loadaddr nand.org
2048 bytes read in 10 ms (199.2 KiB/s)
=> nand write $loadaddr 0 800

NAND write: device 0 offset 0x0, size 0x800
ecc: fc67657
ecc: f78ed444
ecc: dad5af87
ecc: 2dbc313b
ecc: 0
ecc: 0
ecc: 0
ecc: 0
 2048 bytes written: OK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nand.org
Type: application/octet-stream
Size: 2048 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230517/62d96d9e/attachment-0001.obj>


More information about the U-Boot mailing list