]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
remoteproc: xlnx: Avoid mailbox setup
authorTanmay Shah <tanmay.shah@amd.com>
Tue, 3 Mar 2026 23:51:26 +0000 (15:51 -0800)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Tue, 10 Mar 2026 15:19:29 +0000 (09:19 -0600)
Mailbox properties are optional in the remoteproc xlnx bindings.
If mailbox properties are not found in device-tree it's not fatal error
in the driver. Driver will print warning messages and continue with
normal operation. However, these warning messages can be interpreted as
error. Check "mboxes" and "mbox-names" properties in the driver and setup
mailbox only if they are available in the device-tree.
This will avoid any unwanted warning/error messages.

Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
Link: https://lore.kernel.org/r/20260303235127.2317955-2-tanmay.shah@amd.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
drivers/remoteproc/xlnx_r5_remoteproc.c

index 5a468d959f1e8bbce74bc2869ab536558da57285..148d8c622566dd7b969f59002a874743068ee795 100644 (file)
@@ -265,6 +265,10 @@ static struct mbox_info *zynqmp_r5_setup_mbox(struct device *cdev)
        struct mbox_client *mbox_cl;
        struct mbox_info *ipi;
 
+       if (!of_property_present(dev_of_node(cdev), "mboxes") ||
+           !of_property_present(dev_of_node(cdev), "mbox-names"))
+               return NULL;
+
        ipi = kzalloc_obj(*ipi);
        if (!ipi)
                return NULL;