NAND Flash 40-bit ECC support in SDK2.0

cancel
Showing results for 
Search instead for 
Did you mean: 

NAND Flash 40-bit ECC support in SDK2.0

928 Views
vidyasagar
Contributor III

Dear All,

We are using 32GB 40-bit ECC (40-bit ECC per 1117 bytes of data) NAND flash 4chip select (cs1-4) in T2080RDB design, SDK2.0 uboot detected 32GB memory, but read write is not happening in u-boot.

We have disable the ECC parameter in the u-boot as per errata (T2080CE-Rev5.pdf) suggested  chapter (A-007101:
Problems with ECC mode when using 8 KB page size NAND devices).

We have validated timing parameter from code warrior and put in the boot loader.

Second, kernel is also getting detected all 32GB memory, after disabling ECC support in the linux.

Here read/write is happening by using below command.

Below

flash_eraseall /dev/mtd5
ubiattach /dev/ubi_ctrl -m 5 -d 5
ubimkvol /dev/ubi5 -n 0 -N rootfs -m
mkdir -p /mnt/ubi5; mount -t ubifs ubi5_0 /mnt/ubi5

Please let me know how nand flash will get auto mount in the linux boot time.

Each and every time we are erasing the nand memory then its getting mounted.

Thanks,

Amit

Labels (1)
0 Kudos
4 Replies

442 Views
vidyasagar
Contributor III

Dear Pavel,

I am getting below error while mounting in the run time.

Below command works fine.

ubiformat /dev/mtd5 -s 8192 -O 8192


ubiattach /dev/ubi_ctrl -m 5 -O 8192

ubimkvol /dev/ubi0 -N ubifs_volume -m

mount -t ubifs ubi0:ubifs_volume npc

echo hello> npc/hello.txt

cat npc/hello.txt

hello

And after reboot also

mount -t ubifs ubi0:ubifs_volume npc

echo hello> npc/hello.txt

cat npc/hello.txt

hello

So I have modified the rmnologin.sh and linked up to S99rmnologin.sh

ubi0: default fastmap pool size: 200
ubi0: default fastmap WL pool size: 100
ubi0: attaching mtd5
random: nonblocking pool is initialized
ubi0: scanning is finished
ubi0: attached mtd5 (name "fff800000.flash", size 8192 MiB)
ubi0: PEB size: 2097152 bytes (2048 KiB), LEB size: 2080768 bytes
ubi0: min./max. I/O unit sizes: 8192/8192, sub-page size 8192
ubi0: VID header offset: 8192 (aligned 8192), data offset: 16384
ubi0: good PEBs: 4069, bad PEBs: 27, corrupted PEBs: 0
ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 3926616408
ubi0: available PEBs: 0, total reserved PEBs: 4069, PEBs reserved for bad PEB handling: 53
Unable to handle kernel paging request for data at address 0x00000000
Faulting instruction address: 0xc000000000492b20
Oops: Kernel access of bad area, sig: 11 [#1]
ubi0: background thread "ubi_bgt0d" started, PID 1680
SMP NR_CPUS=24 CoreNet Generic
Modules linked in:
CPU: 3 PID: 1678 Comm: ubiattach Not tainted 4.1.8-rt8 #6
task: c00000007e5dcc10 ti: c00000007e7a4000 task.ti: c00000007e7a4000
NIP: c000000000492b20 LR: c0000000004a5844 CTR: c0000000004a57a0
REGS: c00000007e7a7150 TRAP: 0300   Not tainted  (4.1.8-rt8)
MSR: 0000000080029000 <CE,EE,ME>  CR: 44002244  XER: 00000000
DEAR: 0000000000000000 ESR: 0000000000000100 SOFTE: 1
GPR00: c0000000004a5844 c00000007e7a73d0 c000000000d70400 0000000000000000
GPR04: 0000000000000000 c00000007e7a7620 0000000000000000 0000000000000044
GPR08: 0000000000000000 00000000001fc000 c0000000004a57a0 0000000000000000
GPR12: 0000000028002282 c00000003fff6440 0000000010100000 0000000000000000
GPR16: 0000000000000000 00000000100fda18 00000000100fda08 0000000010100000
GPR20: 0000000000000000 0000000010010000 0000000010005938 c00000007e7f6638
GPR24: c00000007e7f622c 0000000000000000 c00000007e7a7620 0000000000000000
GPR28: c00000007e7a7620 0000000000000000 0000000000000001 0000000000000044
NIP [c000000000492b20] .ubi_leb_read+0x40/0x170
LR [c0000000004a5844] .gluebi_read+0xa4/0x130
Call Trace:
[c00000007e7a73d0] [c00000007e7a7480] 0xc00000007e7a7480 (unreliable)
[c00000007e7a7480] [c0000000004a5844] .gluebi_read+0xa4/0x130
[c00000007e7a7530] [c00000000045738c] .mtd_read+0x6c/0xe0
[c00000007e7a75b0] [c000000000460818] .ftl_add_mtd+0xe8/0x7b0
[c00000007e7a76d0] [c00000000045fb40] .blktrans_notify_add+0x60/0x90
[c00000007e7a7760] [c0000000004575cc] .add_mtd_device+0x1cc/0x320
[c00000007e7a7810] [c000000000457840] .mtd_device_parse_register+0x120/0x160
[c00000007e7a78b0] [c0000000004a5c14] .gluebi_notify+0x344/0x5e0
[c00000007e7a7940] [c000000000061fec] .notifier_call_chain+0x7c/0xf0
[c00000007e7a79e0] [c000000000062454] .__blocking_notifier_call_chain+0x64/0xa0
[c00000007e7a7a80] [c00000000048e928] .ubi_notify_all+0xf8/0x160
[c00000007e7a7ba0] [c000000000490060] .ubi_attach_mtd_dev+0xfb0/0xff0
[c00000007e7a7c70] [c0000000004914b8] .ctrl_cdev_ioctl+0xd8/0x1f0
[c00000007e7a7d20] [c00000000019bc88] .compat_SyS_ioctl+0x258/0x1860
[c00000007e7a7e30] [c000000000000698] __system_call+0x0/0x8c
Instruction dump:
fb61ffd8 7cba2b78 fba1ffe8 7d1b4378 fbe1fff8 7cdd3378 f8010010 7cff3b78
fb01ffc0 fb81ffe0 fbc1fff0 f821ff51 <ebc30000> eb9e0228 eb1e0232 e92d0608
---[ end trace 3902216c9bad90b8 ]---

/etc/rc5.d/S99rmnologin.sh: line 21:  1678 SegmeUBIFS error (pid: 1683): cannot open "ubi0:ubifs_volume", error -19ntation fault      ubiattach /dev/ubi_ctrl -m 5 -O 8192
mount: unknown filesystem type 'ubifs'
DONE !!!
Network
network setting done !!!

Please let me know how to resolve the issue.

Thanks,

Amit

0 Kudos

442 Views
Pavel
NXP TechSupport
NXP TechSupport

Create please a Technical Case to investigate the issue:


Have a great day,
Pavel Chubakov

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

442 Views
Pavel
NXP TechSupport
NXP TechSupport

Look at the TN-29-71 file about using software ECC under Linux:

https://www.micron.com/advanced-search?q=TN-29-71


Have a great day,
Pavel Chubakov

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

442 Views
vidyasagar
Contributor III

Dear Pavel,

Thanks for reply.

After apply the provide patch in the kernel, same issue facing the user

space.

NAND is not getting auto mount in the run time and each and every boot need

to erase the NAND flash.

Thanks,

Amit

0 Kudos