Skip to content

Commit e4bc8d3

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 1680ab0 commit e4bc8d3

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
@@ -990,7 +990,7 @@ static int zynqmp_r5_get_sram_banks(struct zynqmp_r5_core *r5_core)
990990
}
991991

992992
/* Get SRAM device address */
993-
ret = of_property_read_reg(sram_np, i, &abs_addr, &size);
993+
ret = of_property_read_reg(sram_np, 0, &abs_addr, &size);
994994
if (ret) {
995995
dev_err(dev, "failed to get reg property\n");
996996
goto fail_sram_get;

0 commit comments

Comments
 (0)