* [PATCH] remoteproc: xlnx: fix sram property parsing
@ 2026-02-04 20:27 Tanmay Shah
2026-02-06 16:01 ` Mathieu Poirier
0 siblings, 1 reply; 3+ messages in thread
From: Tanmay Shah @ 2026-02-04 20:27 UTC (permalink / raw)
To: andersson, mathieu.poirier, tanmay.shah
Cc: linux-remoteproc, linux-kernel, Tim Michals
From: Tim Michals <tcmichals@yahoo.com>
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>
---
drivers/remoteproc/xlnx_r5_remoteproc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/remoteproc/xlnx_r5_remoteproc.c b/drivers/remoteproc/xlnx_r5_remoteproc.c
index bd619a6c42aa..970a9ef97945 100644
--- a/drivers/remoteproc/xlnx_r5_remoteproc.c
+++ b/drivers/remoteproc/xlnx_r5_remoteproc.c
@@ -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;
base-commit: 85ab651885e1b542ee0bb9ec4642ef0b11716997
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] remoteproc: xlnx: fix sram property parsing
2026-02-04 20:27 [PATCH] remoteproc: xlnx: fix sram property parsing Tanmay Shah
@ 2026-02-06 16:01 ` Mathieu Poirier
2026-02-06 16:38 ` Shah, Tanmay
0 siblings, 1 reply; 3+ messages in thread
From: Mathieu Poirier @ 2026-02-06 16:01 UTC (permalink / raw)
To: Tanmay Shah; +Cc: andersson, linux-remoteproc, linux-kernel, Tim Michals
On Wed, Feb 04, 2026 at 12:27:30PM -0800, Tanmay Shah wrote:
> From: Tim Michals <tcmichals@yahoo.com>
>
> 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>
> ---
> drivers/remoteproc/xlnx_r5_remoteproc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/remoteproc/xlnx_r5_remoteproc.c b/drivers/remoteproc/xlnx_r5_remoteproc.c
> index bd619a6c42aa..970a9ef97945 100644
> --- a/drivers/remoteproc/xlnx_r5_remoteproc.c
> +++ b/drivers/remoteproc/xlnx_r5_remoteproc.c
> @@ -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);
I'll pick this up in two weeks when 6.20-rc1 comes out.
On a separate note, it would help if an example that includes an "sram" was part
of the xlnx_r5 bindings.
Thanks,
Mathieu
> if (ret) {
> dev_err(dev, "failed to get reg property\n");
> goto fail_sram_get;
>
> base-commit: 85ab651885e1b542ee0bb9ec4642ef0b11716997
> --
> 2.34.1
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] remoteproc: xlnx: fix sram property parsing
2026-02-06 16:01 ` Mathieu Poirier
@ 2026-02-06 16:38 ` Shah, Tanmay
0 siblings, 0 replies; 3+ messages in thread
From: Shah, Tanmay @ 2026-02-06 16:38 UTC (permalink / raw)
To: Mathieu Poirier, Tanmay Shah
Cc: andersson, linux-remoteproc, linux-kernel, Tim Michals
On 2/6/2026 10:01 AM, Mathieu Poirier wrote:
> On Wed, Feb 04, 2026 at 12:27:30PM -0800, Tanmay Shah wrote:
>> From: Tim Michals <tcmichals@yahoo.com>
>>
>> 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>
>> ---
>> drivers/remoteproc/xlnx_r5_remoteproc.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/remoteproc/xlnx_r5_remoteproc.c b/drivers/remoteproc/xlnx_r5_remoteproc.c
>> index bd619a6c42aa..970a9ef97945 100644
>> --- a/drivers/remoteproc/xlnx_r5_remoteproc.c
>> +++ b/drivers/remoteproc/xlnx_r5_remoteproc.c
>> @@ -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);
>
> I'll pick this up in two weeks when 6.20-rc1 comes out.
>
> On a separate note, it would help if an example that includes an "sram" was part
> of the xlnx_r5 bindings.
>
Thank You for reviews.
Sure, I will send separate patch including sram nodes in the bindings.
Tanmay
> Thanks,
> Mathieu
>
>> if (ret) {
>> dev_err(dev, "failed to get reg property\n");
>> goto fail_sram_get;
>>
>> base-commit: 85ab651885e1b542ee0bb9ec4642ef0b11716997
>> --
>> 2.34.1
>>
>>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-02-06 16:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-04 20:27 [PATCH] remoteproc: xlnx: fix sram property parsing Tanmay Shah
2026-02-06 16:01 ` Mathieu Poirier
2026-02-06 16:38 ` Shah, Tanmay
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.