summaryrefslogtreecommitdiffstats
path: root/drivers/mailbox/zynqmp-ipi-mailbox.c
diff options
context:
space:
mode:
authorTanmay Shah <tanmay.shah@amd.com>2024-11-12 18:06:12 +0100
committerJassi Brar <jassisinghbrar@gmail.com>2024-11-24 20:07:50 +0100
commit98fc87fe2937db5a4948c553f69b5a3cc94c230a (patch)
treeb6c0080f47b7de292187e29606df35381e9333f9 /drivers/mailbox/zynqmp-ipi-mailbox.c
parentdt-bindings: mailbox: Add thead,th1520-mailbox bindings (diff)
downloadlinux-98fc87fe2937db5a4948c553f69b5a3cc94c230a.tar.xz
linux-98fc87fe2937db5a4948c553f69b5a3cc94c230a.zip
mailbox: zynqmp: setup IPI for each valid child node
As per zynqmp-ipi bindings, zynqmp IPI node can have multiple child nodes. Current IPI setup function is set only for first child node. If IPI node has multiple child nodes in the device-tree, then IPI setup fails for child nodes other than first child node. In such case kernel will crash. Fix this crash by registering IPI setup function for each available child node. Signed-off-by: Tanmay Shah <tanmay.shah@amd.com> Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
Diffstat (limited to '')
-rw-r--r--drivers/mailbox/zynqmp-ipi-mailbox.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mailbox/zynqmp-ipi-mailbox.c b/drivers/mailbox/zynqmp-ipi-mailbox.c
index 521d08b9ab47..815e0492f029 100644
--- a/drivers/mailbox/zynqmp-ipi-mailbox.c
+++ b/drivers/mailbox/zynqmp-ipi-mailbox.c
@@ -940,10 +940,10 @@ static int zynqmp_ipi_probe(struct platform_device *pdev)
pdata->num_mboxes = num_mboxes;
mbox = pdata->ipi_mboxes;
- mbox->setup_ipi_fn = ipi_fn;
-
for_each_available_child_of_node(np, nc) {
mbox->pdata = pdata;
+ mbox->setup_ipi_fn = ipi_fn;
+
ret = zynqmp_ipi_mbox_probe(mbox, nc);
if (ret) {
of_node_put(nc);