07-23-2019 03:44 AM - edited 07-23-2019 05:53 AM
short: remoteproc does not see irq numbers defined in dts
I've been succesfuly using remoteproc to run programs without IPI.
Now my aim is tu run a simple OpenAMP baremetal app on r5_0 and Linux host on A53.
I have built the apps from openamp repository, but I am missing some Linux drivers or dts to run them.
When I load remoteproc module, I get this response:
[ 45.694145] zynqmp_r5_remoteproc ff9a0100.zynqmp_r5_rproc: RPU core_conf: split0 [ 45.701596] zynqmp_r5_remoteproc ff9a0100.zynqmp_r5_rproc: unable to find IPI IRQ [ 45.709001] remoteproc remoteproc0: releasing ff9a0100.zynqmp_r5_rproc
As far as I know, the problem should be fixed just with a change in the devicetree, but I haven't found a proper solution yet. I attach diff of my devicetree.
Also, I don't understand if I should use zynqmp-ipi-mailbox, or ipi_uio, or both. The goal is mailbox, but the tutorials and references are confusing about what entries in dts are really needed here.
There are irq numbers defined in the devicetree, but the driver does not get them. Can it be a problem, that It's all inside amba node, and amba does not have an irq controller?
The problem is not related to any specific demo, as It appears on enabling rpu.
I modprobe this modules, but I don't even know if I need them:
uio_pdrv_genirq, rpmsg_core, virtio_rpmsg_bus
Think the first step would be to get rid of the "unable to find IPI IRQ" message. Am I right? Also, how do fix this?
I have already checked information in getting started guides for OpenAMP and this thread on github, and unfortunately none of these solved my problem:
Thanks for any help.
07-23-2019 05:38 AM - edited 07-23-2019 06:11 AM
# modprobe rpmsg_core # modprobe virtio_rpmsg_bus # modprobe uio_pdrv_genirq # echo "uio_pdrv_genirq" > /sys/bus/platform/devices/ff340000.ipi/driver_override # echo "ff340000.ipi" > /sys/bus/platform/drivers/uio_pdrv_genirq/bind # modprobe zynqmp_r5_remoteproc [ 75.028679] zynqmp_r5_remoteproc ff9a0100.zynqmp_r5_rproc: RPU core_conf: split0 [ 75.036150] genirq: Flags mismatch irq 37. 00000084 (ff9a0100.zynqmp_r5_rproc) vs. 00000004 (ipi) [ 75.044943] zynqmp_r5_remoteproc ff9a0100.zynqmp_r5_rproc: IRQ 37 already allocated [ 75.052575] remoteproc remoteproc0: releasing ff9a0100.zynqmp_r5_rproc [ 75.059095] zynqmp_r5_remoteproc: probe of ff9a0100.zynqmp_r5_rproc failed with error -16
I have added this lines in zynqmp_r5_rproc@0:
interrupt-parent = <&gic>; interrupts = <0 29 4>;
Now I have the same interrupts defined in too many places, but at least they are bound.
All the sources I've been using have either zynqmp-ipi-mailbox node, or ipi_uio node, not both. Should I use them altogether if I want to have mailboxes? If I get rid of ipi_uio, then again I will have a problem with no ipi resource.
I attach diff of dts again.
This might be interesting, too:
# dmesg | grep zynq [ 0.001352] zynqmp_plat_init Platform Management API v1.0 [ 0.001357] zynqmp_plat_init Trustzone version v1.0 [ 0.200906] zynqmp-pinctrl pinctrl: zynqmp pinctrl initialized [ 0.201699] reset_zynqmp reset-controller: Xilinx zynqmp reset driver probed [ 1.302553] zynqmp-ipi ff9905c0.mailbox: Probed ZynqMP IPI Mailbox driver. [ 1.302629] zynqmp-ipi amba:zynqmp_ipi: invalid resource [ 1.302635] zynqmp-ipi amba:zynqmp_ipi: Unable to map IPI buffer I/O memory [ 1.302645] zynqmp-ipi: probe of amba:zynqmp_ipi failed with error -22
07-23-2019 10:07 AM
Which version of the tools/software is being used?