]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
remoteproc: xlnx: Fix sram property parsing
authorTim Michals <tcmichals@yahoo.com>
Wed, 4 Feb 2026 20:27:30 +0000 (12:27 -0800)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Tue, 24 Feb 2026 15:31:59 +0000 (08:31 -0700)
As per sram bindings, "sram" property can be list of phandles.
When more than one sram phandles are listed, driver can't parse second
phandle's address correctly. Because, phandle index is passed to the API
instead of offset of address from reg property which is always 0 as per
sram.yaml bindings. Fix it by passing 0 to the API instead of sram
phandle index.

Fixes: 77fcdf51b8ca ("remoteproc: xlnx: Add sram support")
Signed-off-by: Tim Michals <tcmichals@yahoo.com>
Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
Link: https://lore.kernel.org/r/20260204202730.3729984-1-tanmay.shah@amd.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
drivers/remoteproc/xlnx_r5_remoteproc.c

index b71ce69afe9f41d55fb53a483e9d67169df35c2b..5a468d959f1e8bbce74bc2869ab536558da57285 100644 (file)
@@ -1005,7 +1005,7 @@ static int zynqmp_r5_get_sram_banks(struct zynqmp_r5_core *r5_core)
                }
 
                /* Get SRAM device address */
-               ret = of_property_read_reg(sram_np, i, &abs_addr, &size);
+               ret = of_property_read_reg(sram_np, 0, &abs_addr, &size);
                if (ret) {
                        dev_err(dev, "failed to get reg property\n");
                        goto fail_sram_get;