Skip to content

Commit 405c945

Browse files
tcmichalsgregkh
authored andcommitted
remoteproc: xlnx: Fix sram property parsing
[ Upstream commit d116bcc ] 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: 77fcdf5 ("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 514f1eb commit 405c945

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/remoteproc/xlnx_r5_remoteproc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1022,7 +1022,7 @@ static int zynqmp_r5_get_sram_banks(struct zynqmp_r5_core *r5_core)
10221022
}
10231023

10241024
/* Get SRAM device address */
1025-
ret = of_property_read_reg(sram_np, i, &abs_addr, &size);
1025+
ret = of_property_read_reg(sram_np, 0, &abs_addr, &size);
10261026
if (ret) {
10271027
dev_err(dev, "failed to get reg property\n");
10281028
goto fail_sram_get;

0 commit comments

Comments
 (0)