cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
amiri
Observer
Observer
639 Views
Registered: ‎05-31-2018

Kernel fault on spi_zynq_qspi

On default kernel used on PetaLinux 2018.2 and 2018.3, if I mark the spi_zynq_qspi as a core component, the kernel boots and works normally.

However, if I mark the component as a module, I will receive the following kernel fault and the QSPI will not become usable (kernel log is below).

This is the output from the lsmod:

Tainted: G
zynq_remoteproc 16384 0 - Live 0xbf010000
spi_zynq_qspi 24576 1 - Loading 0xbf008000
uio_pdrv_genirq 16384 0 - Live 0xbf000000

I would like to access the QSPI on RTOS in an AMP configuration. Meanwhile, I need the Linux to be able to overwrite the QSPI during a system upgrade without depending on RTOS. 

Many thanks for your time!

Mahdi

===============================

This is the output during the kernel boot:

Freeing unused kernel memory: 1024K
INIT: version 2.88 booting
Starting udev
udevd[737]: starting version 3.2.2
udevd[738]: starting eudev-3.2.2
m25p80 spi0.0: found n25q00, expected n25q512a
Unable to handle kernel paging request at virtual address c0746164
pgd = db47c000
[c0746164] *pgd=0261940e(bad)
Internal error: Oops - BUG: 80d [#1] PREEMPT SMP ARM
Modules linked in: spi_zynq_qspi(+) uio_pdrv_genirq
CPU: 1 PID: 742 Comm: udevd Not tainted 4.14.0-xilinx-v2018.3 #1
Hardware name: Xilinx Zynq Platform
task: dd620d80 task.stack: db47a000
PC is at spi_nor_scan+0x51c/0xc5c
LR is at of_find_property+0x40/0x4c
remoteproc remoteproc0: remoteproc@0 is available
pc : [<c04082d8>] lr : [<c04ff824>] psr: 000d0113
sp : db47bb00 ip : 00000000 fp : ddc28ea8
r10: db47bc0c r9 : 00000000 r8 : ddc291f0
r7 : dd6fec00 r6 : 00000000 r5 : c0746154 r4 : dd6fe018
r3 : 00001000 r2 : 10000000 r1 : 00000000 r0 : 08000000
Flags: nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
Control: 18c5387d Table: 1d47c04a DAC: 00000051
Process udevd (pid: 742, stack limit = 0xdb47a210)
Stack: (0xdb47bb00 to 0xdb47c000)

....

[<c04082d8>] (spi_nor_scan) from [<c03fc138>] (m25p_probe+0xf4/0x164)
[<c03fc138>] (m25p_probe) from [<c040996c>] (spi_drv_probe+0x88/0xa0)
[<c040996c>] (spi_drv_probe) from [<c03b82e8>] (driver_probe_device+0x1ec/0x2b0)
[<c03b82e8>] (driver_probe_device) from [<c03b6be0>] (bus_for_each_drv+0x84/0x8c)
[<c03b6be0>] (bus_for_each_drv) from [<c03b8070>] (__device_attach+0x98/0x100)
[<c03b8070>] (__device_attach) from [<c03b76c0>] (bus_probe_device+0x28/0x80)
[<c03b76c0>] (bus_probe_device) from [<c03b5edc>] (device_add+0x400/0x500)
[<c03b5edc>] (device_add) from [<c040a458>] (spi_add_device+0xe4/0x124)
[<c040a458>] (spi_add_device) from [<c040a9bc>] (of_register_spi_device+0x298/0x2fc)
[<c040a9bc>] (of_register_spi_device) from [<c040ae88>] (spi_register_controller+0x348/0x524)
[<c040ae88>] (spi_register_controller) from [<bf0086cc>] (zynq_qspi_probe+0x298/0x384 [spi_zynq_qspi])
[<bf0086cc>] (zynq_qspi_probe [spi_zynq_qspi]) from [<c03b97a4>] (platform_drv_probe+0x50/0x9c)
[<c03b97a4>] (platform_drv_probe) from [<c03b82e8>] (driver_probe_device+0x1ec/0x2b0)
[<c03b82e8>] (driver_probe_device) from [<c03b8428>] (__driver_attach+0x7c/0xa8)
[<c03b8428>] (__driver_attach) from [<c03b6b38>] (bus_for_each_dev+0x7c/0x8c)
[<c03b6b38>] (bus_for_each_dev) from [<c03b7960>] (bus_add_driver+0x16c/0x1d4)
[<c03b7960>] (bus_add_driver) from [<c03b8bac>] (driver_register+0xa0/0xe0)
[<c03b8bac>] (driver_register) from [<c0101a54>] (do_one_initcall+0xfc/0x11c)
[<c0101a54>] (do_one_initcall) from [<c017a7f8>] (do_init_module+0x54/0x1c4)
[<c017a7f8>] (do_init_module) from [<c0179c88>] (load_module+0x1d98/0x1e9c)
[<c0179c88>] (load_module) from [<c0179f40>] (SyS_finit_module+0x88/0x90)
[<c0179f40>] (SyS_finit_module) from [<c0107020>] (ret_fast_syscall+0x0/0x48)
Code: e0a13001 e1c420f8 e1d531b0 e1a03083 (e1c531b0)
---[ end trace c789f2262091be33 ]---

0 Kudos
1 Reply
lmu@silicom.dk
Observer
Observer
290 Views
Registered: ‎10-16-2019

Hi Mahdi

I am facing similar issues, but with 2019.2. Did you ever find a solution?

Thanks

Lars

 

 

0 Kudos