Sample Header Ad - 728x90

Kernel Panic when trying to write in Flash after kernel update

0 votes
0 answers
29 views
I recently updated my Linux Kernel from 5.4.104 to 5.15 and after that i cant write anymore on my QSPI NOR FLASH. I did a little research and it seems that the cadence qspi controller started using the spi-mem framework and i suspect that this screwed my QSPI write operations. during kernel bringup it seems that everything is just fine, as it can be seen below:
[    1.400740] spi-nor spi0.0: found n25q128a13, expected n25q512a
[    1.406841] spi-nor spi0.0: n25q128a13 (16384 Kbytes)
[    1.411954] 8 fixed-partitions partitions found on MTD device ff705000.flash.0
[    1.419165] Creating 8 MTD partitions on "ff705000.flash.0":
[    1.424806] 0x000000000000-0x000000001000 : "SPL/u-boot image"
[    1.431977] 0x000000001000-0x000000002000 : "SPL/u-boot dtb"
[    1.438908] 0x000000002000-0x000000003000 : "reserved-0"
[    1.445441] 0x000000003000-0x000000004000 : "reserved-1"
[    1.452053] 0x000000200000-0x000000201000 : "u-boot environment 1"
[    1.459482] 0x000000210000-0x000000211000 : "u-boot environment 2"
[    1.466895] 0x000000800000-0x000000c00000 : "FPGA safe image"
[    1.473928] 0x000000c00000-0x000001000000 : "FPGA user image"
reading seems fine but when i try to read i gives me a kernel panic:
# echo "hello" > /dev/mtdblock7
[ 1146.935881] 8]    lr : []    psr: 20030013
[ 1146.986902] sp : c23899b8  ip : c23899a8  fp : c2389a14
[ 1146.992106] r10: 00000100  r9 : f08e4000  r8 : c1234040
[ 1146.997310] r7 : c1213b80  r6 : c1213b80  r5 : 00000000  r4 : c2389c18
[ 1147.003810] r3 : 00000001  r2 : 00000730  r1 : 00000000  r0 : 00000000
[ 1147.010308] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[ 1147.017419] Control: 10c5387d  Table: 02a1404a  DAC: 00000051
[ 1147.023141] Register r0 information: NULL pointer
[ 1147.027831] Register r1 information: NULL pointer
[ 1147.032518] Register r2 information: non-paged memory
[ 1147.037551] Register r3 information: non-paged memory
[ 1147.042584] Register r4 information: non-slab/vmalloc memory
[ 1147.048223] Register r5 information: NULL pointer
[ 1147.052910] Register r6 information: slab kmalloc-2k start c1213800 pointer offset 896 size 2048
[ 1147.061678] Register r7 information: slab kmalloc-2k start c1213800 pointer offset 896 size 2048
[ 1147.070443] Register r8 information: slab kmalloc-8k start c1234000 pointer offset 64 size 8192
[ 1147.079122] Register r9 information: 0-page vmalloc region starting at 0xf08e4000 allocated at __devm_ioremap_resource+0x170/0x1e8
[ 1147.090823] Register r10 information: non-paged memory
[ 1147.095944] Register r11 information: non-slab/vmalloc memory
[ 1147.101669] Register r12 information: non-slab/vmalloc memory
[ 1147.107395] Process sh (pid: 613, stack limit = 0x4e67e691)
[ 1147.112949] Stack: (0xc23899b8 to 0xc238a000)
[ 1147.117293] 99a0:                                                       c01a5f98 c076e370
.
.
.
Has anyone encountered this kind of problem and knows how to solve it? Any suggestions or insights would be greatly appreciated.
Asked by Vitor Woyakewicz (1 rep)
Nov 29, 2024, 07:33 PM