Part Number:AM625
1,使用GIgoDevice 5G2GM OSPI nand flash 读错误,写入操作好像没有问题
2,设备树为:
&ospi0 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&ospi0_pins_default>;
flash@0{
compatible = "spi-nand";
reg = <0x0>;
spi-tx-bus-width = <4>;
spi-rx-bus-width = <4>;
spi-max-frequency = <25000000>;
//spi-max-frequency = <500000000>;
cdns,tshsl-ns = <60>;
cdns,tsd2d-ns = <60>;
cdns,tchsh-ns = <60>;
cdns,tslch-ns = <60>;
cdns,read-delay = <2>;
bits-per-word = <8>;
};
};
3,mtd_speedtest测试会提示读失败,写入操作好像没有问题。
4,
我们把/dev/mtd0挂载到ubifs系统中,如果重启后,再读取里面的文件有一定概率出现下面的读取错误,
按照规律是写入没有出现过问题,读取操作的确很容易出错误
root@M840E:/mnt# cp filetmp /tmp/
[ 102.069798] ————[ cut here ]————
[ 102.074436] WARNING: CPU: 0 PID: 735 at drivers/spi/spi-mem.c:216 spi_mem_check_op+0x120/0x130
[ 102.083049] Modules linked in: dido(O) led(O) wdog(O) pmc(O) cryptodev(O)
[ 102.089845] CPU: 0 PID: 735 Comm: cp Tainted: G O 6.1.33 #14
[ 102.096878] Hardware name: Texas Instruments AM625 SK (DT)
[ 102.102350] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=–)
[ 102.109297] pc : spi_mem_check_op+0x120/0x130
[ 102.113643] lr : spi_mem_check_op+0x80/0x130
[ 102.117902] sp : ffff80000bb32fb0
[ 102.121203] x29: ffff80000bb32fb0 x28: 0000000000000000 x27: 00000000ffffffb6
[ 102.128326] x26: 0000000000000000 x25: ffff0000012b1380 x24: 0000000000000800
[ 102.135451] x23: ffff000000d06800 x22: ffff000000d05000 x21: ffff0000014a0b80
[ 102.142573] x20: ffff0000014d0880 x19: ffff80000bb33300 x18: 000000000002abea
[ 102.149696] x17: 00000000ffffffbc x16: ffff800009aa1028 x15: 5d3b8bd5803f546e
[ 102.156819] x14: b1aa39b9d53b14fb x13: 717990c0d7e69bfc x12: 122749c3e0e97a5d
[ 102.163943] x11: 1f5edff7b7c70ddc x10: 9b50c9bf0d924f5c x9 : 0000000000000000
[ 102.171066] x8 : ffff80000bb332c8 x7 : 0000000000000000 x6 : 000000000000003f
[ 102.178189] x5 : 0000000000000040 x4 : fffffffffffffff0 x3 : 0000000000000000
[ 102.185311] x2 : ffff80000bb332ff x1 : ffff80000bb34000 x0 : 0000000000000000
[ 102.192434] Call trace:
[ 102.194872] spi_mem_check_op+0x120/0x130
[ 102.198874] spi_mem_exec_op+0x50/0x410
[ 102.202699] gd5fxgq4uexxg_ecc_get_status+0x84/0xfc
[ 102.207569] spinand_ondie_ecc_finish_io_req+0x44/0xe4
[ 102.212699] nand_ecc_finish_io_req+0x24/0x40
[ 102.217044] spinand_read_page+0x198/0x264
[ 102.221128] spinand_mtd_read+0x1e0/0x370
[ 102.225126] mtd_read_oob_std+0x5c/0x8c
[ 102.228953] mtd_read_oob+0x8c/0x150
[ 102.232520] mtd_read+0x64/0xa0
[ 102.235652] ubi_io_read+0xcc/0x3a0
[ 102.239139] ubi_eba_read_leb+0xac/0x41c
[ 102.243052] ubi_leb_read+0x88/0xec
[ 102.246530] ubifs_leb_read+0x38/0x94
[ 102.250187] fallible_read_node.isra.0+0x4c/0x164
[ 102.254880] ubifs_tnc_locate+0x14c/0x1dc
[ 102.258879] do_readpage+0x174/0x44c
[ 102.262444] ubifs_read_folio+0x58/0x4e0
[ 102.266356] filemap_read_folio+0x3c/0xf0
[ 102.270360] filemap_get_pages+0x2f4/0x674
[ 102.274447] filemap_read+0xb4/0x360
[ 102.278010] generic_file_read_iter+0x100/0x19c
[ 102.282533] generic_file_splice_read+0x78/0x154
[ 102.287139] do_splice_to+0x90/0xe0
[ 102.290616] splice_direct_to_actor+0xa0/0x240
[ 102.295047] do_splice_direct+0x88/0xd4
[ 102.298871] do_sendfile+0x2f0/0x38c
[ 102.302438] __arm64_sys_sendfile64+0x130/0x140
[ 102.306957] invoke_syscall+0x48/0x114
[ 102.31070xfc
[ 102.315395] do_el0_svc+0x30/0xd0
[ 102.318701] el0_svc+0x2c/0x84
[ 102.321752] el0t_64_sync_handler+0xbc/0x140
[ 102.326011] el0t_64_sync+0x18c/0x190
[ 102.329667] —[ end trace 0000000000000000 ]—
[ 102.341144] ubi0 warning: ubi_io_read: error -22 while reading 2865 bytes from PEB 558:58104, read only 1288 bytes, retry
[ 102.353594] ubi0 warning: ubi_io_read: error -22 while reading 2865 bytes from PEB 558:58104, read only 1288 bytes, retry
[ 102.370735] ubi0 warning: ubi_io_read: error -22 while reading 2865 bytes from PEB 558:58104, read only 1288 bytes, retry
[ 102.385269] ubi0 error: ubi_io_read: error -22 while reading 2865 bytes from PEB 558:58104, read 1288 bytes
[ 102.400422] CPU: 0 PID: 735 Comm: cp Tainted: G W O 6.1.33 #14
[ 102.407495] Hardware name: Texas Instruments AM625 SK (DT)
[ 102.412973] Call trace:
[ 102.415410] dump_backtrace.part.0+0xdc/0xf0
[ 102.419687] show_stack+0x18/0x30
[ 102.422994] dump_stack_lvl+0x68/0x84
[ 102.426651] dump_stack+0x18/0x34
[ 102.429957] ubi_io_read+0x1c4/0x3a0
[ 102.433526] ubi_eba_read_leb+0xac/0x41c
[ 102.437438] ubi_leb_read+0x88/0xec
[ 102.440919] ubifs_leb_read+0x38/0x94
[ 102.444575] fallible_read_node.isra.0+0x4c/0x164
[ 102.449268] ubifs_tnc_locate+0x14c/0x1dc
[ 102.453268] do_readpage+0x174/0x44c
[ 102.456833] ubifs_read_folio+0x58/0x4e0
[ 102.460745] filemap_read_folio+0x3c/0xf0
[ 102.464748] filemap_get_pages+0x2f4/0x674
[ 102.468836] filemap_read+0xb4/0x360
[ 102.472400] generic_file_read_iter+0x100/0x19c
[ 102.476919] generic_file_splice_read+0x78/0x154
[ 102.481525] do_splice_to+0x90/0xe0
[ 102.485003] splice_direct_to_actor+0xa0/0x240
[ 102.489433] do_splice_direct+0x88/0xd4
[ 102.493259] do_sendfile+0x2f0/0x38c
[ 102.496825] __arm64_sys_sendfile64+0x130/0x140
[ 102.501344] invoke_syscall+0x48/0x114
[ 102.505087] el0_svc_common.constprop.0+0x44/0xfc
[ 102.509780] do_el0_svc+0x30/0xd0
[ 102.513086] el0_svc+0x2c/0x84
[ 102.516133] el0t_64_sync_handler+0xbc/0x140
[ 102.520392] el0t_64_sync+0x18c/0x190
[ 102.653900] UBIFS error (ubi0:0 pid 735): ubifs_leb_read: reading 2865 bytes from LEB 49:54008 failed, error -22
[ 102.673867] CPU: 0 PID: 735 Comm: cp Tainted: G W O 6.1.33 #14
[ 102.680930] Hardware name: Texas Instruments AM625 SK (DT)
[ 102.686401] Call trace:
[ 102.688844] dump_backtrace.part.0+0xdc/0xf0
[ 102.693120] show_stack+0x18/0x30
[ 102.696426] dump_stack_lvl+0x68/0x84
[ 102.700083] dump_stack+0x18/0x34
[ 102.703389] ubifs_leb_read+0x90/0x94
[ 102.707047] fallible_read_node.isra.0+0x4c/0x164
[ 102.711739] ubifs_tnc_locate+0x14c/0x1dc
[ 102.715740] do_readpage+0x174/0x44c
[ 102.719305] ubifs_read_folio+0x58/0x4e0
[ 102.723218] filemap_read_folio+0x3c/0xf0
[ 102.727223] filemap_get_pages+0x2f4/0x674
[ 102.731310] filemap_read+0xb4/0x360
[ 102.734873] generic_file_read_iter+0x100/0x19c
[ 102.739391] generic_file_splice_read+0x78/0x154
[ 102.743998] do_splice_to+0x90/0xe0
[ 102.747476] splice_direct_to_actor+0xa0/0x240
[ 102.751907] do_splice_direct+0x88/0xd4
[ 102.755731] do_sendfile+0x2f0/0x38c
[ 102.759296] __arm64_sys_sendfile64+0x130/0x140
[ 102.763816] invoke_syscall+0x48/0x114
[ 102.767558] el0_svc_common.constprop.0+0x44/0xfc
[ 102.772252] do_el0_svc+0x30/0xd0
[ 102.775558] el0_svc+0x2c/0x84
[ 102.778605] el0t_64_sync_handler+0xbc/0x140
[ 102.782864] el0t_64_sync+0x18c/0x190
[ 102.802657] UBIFS error (ubi0:0 pid 735): fallible_read_node.isra.0: cannot read node type 1 from LEB 49:54008, error -22
[ 102.815918] ubi0 warning: ubi_io_read: error -22 while reading 2865 bytes from PEB 558:58104, read only 1288 bytes, retry
[ 102.832926] ubi0 warning: ubi_io_read: error -22 while reading 2865 bytes from PEB 558:58104, read only 1288 bytes, retry
[ 102.848779] ubi0 warning: ubi_io_read: error -22 while reading 2865 bytes from PEB 558:58104, read only 1288 bytes, retry
[ 102.862053] ubi0 error: ubi_io_read: error -22 while reading 2865 bytes from PEB 558:58104, read 1288 bytes
[ 102.872835] CPU: 0 PID: 735 Comm: cp Tainted: G W O 6.1.33 #14
[ 102.879892] Hardware name: Texas Instruments AM625 SK (DT)
[ 102.885367] Call trace:
[ 102.887805] dump_backtrace.part.0+0xdc/0xf0
[ 102.892077] show_stack+0x18/0x30
[ 102.895382] dump_stack_lvl+0x68/0x84
[ 102.899039] dump_stack+0x18/0x34
[ 102.902345] ubi_io_read+0x1c4/0x3a0
[ 102.905915] ubi_eba_read_leb+0xac/0x41c
5,内核读到的信息
Lydia:
您好,
感谢您对TI产品的关注!为更加有效地解决您的问题,我们建议您将问题发布在E2E英文技术论坛上(https://e2e.ti.com/p/addpost),将由资深的英文论坛工程师为您提供帮助。