* [PATCH] soc: qcom: geni-se: ignore invalid PROG_RAM_DEPTH when checking for firmware size
@ 2026-09-17 9:07 Neil Armstrong
2026-09-17 9:21 ` Konrad Dybcio
0 siblings, 1 reply; 3+ messages in thread
From: Neil Armstrong @ 2026-09-17 9:07 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Viken Dadhaniya
Cc: Konrad Dybcio, linux-arm-msm, linux-kernel, Neil Armstrong
The I2C Hub serial elements lacks DMA, so the SE_HW_PARAM_2 register which
is in the DMA register space doesn't exist for those instances.
Simply ignore the ram depth if it return 0.
Fixes: 522bfb4f33c0 ("soc: qcom: geni-se: Use HW PROG_RAM_DEPTH to validate firmware size")
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
drivers/soc/qcom/qcom-geni-se.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/qcom/qcom-geni-se.c b/drivers/soc/qcom/qcom-geni-se.c
index 873bfbd6b2b7..e75349f2c15d 100644
--- a/drivers/soc/qcom/qcom-geni-se.c
+++ b/drivers/soc/qcom/qcom-geni-se.c
@@ -1308,7 +1308,7 @@ static struct se_fw_hdr *geni_find_protocol_fw(struct geni_se *se, const struct
prog_ram_depth = FIELD_GET(PROG_RAM_DEPTH_MSK,
readl_relaxed(se->base + SE_HW_PARAM_2));
- if (fw_size >= prog_ram_depth) {
+ if (prog_ram_depth && fw_size >= prog_ram_depth) {
dev_err(dev, "Firmware size (%u) exceeds RAM size (%u)\n",
fw_size, prog_ram_depth);
continue;
---
base-commit: fd73f4a6659897191fa0d40695fe370925dd3780
change-id: 20260917-topic-sm8x50-i2c-hub-fw-ram-54c503be6038
Best regards,
--
Neil Armstrong <neil.armstrong@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] soc: qcom: geni-se: ignore invalid PROG_RAM_DEPTH when checking for firmware size
2026-09-17 9:07 [PATCH] soc: qcom: geni-se: ignore invalid PROG_RAM_DEPTH when checking for firmware size Neil Armstrong
@ 2026-09-17 9:21 ` Konrad Dybcio
2026-09-17 12:19 ` Neil Armstrong
0 siblings, 1 reply; 3+ messages in thread
From: Konrad Dybcio @ 2026-09-17 9:21 UTC (permalink / raw)
To: Neil Armstrong, Bjorn Andersson, Konrad Dybcio, Viken Dadhaniya
Cc: linux-arm-msm, linux-kernel
On 9/17/26 11:07 AM, Neil Armstrong wrote:
> The I2C Hub serial elements lacks DMA, so the SE_HW_PARAM_2 register which
> is in the DMA register space doesn't exist for those instances.
>
> Simply ignore the ram depth if it return 0.
>
> Fixes: 522bfb4f33c0 ("soc: qcom: geni-se: Use HW PROG_RAM_DEPTH to validate firmware size")
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
> drivers/soc/qcom/qcom-geni-se.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/soc/qcom/qcom-geni-se.c b/drivers/soc/qcom/qcom-geni-se.c
> index 873bfbd6b2b7..e75349f2c15d 100644
> --- a/drivers/soc/qcom/qcom-geni-se.c
> +++ b/drivers/soc/qcom/qcom-geni-se.c
> @@ -1308,7 +1308,7 @@ static struct se_fw_hdr *geni_find_protocol_fw(struct geni_se *se, const struct
>
> prog_ram_depth = FIELD_GET(PROG_RAM_DEPTH_MSK,
> readl_relaxed(se->base + SE_HW_PARAM_2));
> - if (fw_size >= prog_ram_depth) {
> + if (prog_ram_depth && fw_size >= prog_ram_depth) {
> dev_err(dev, "Firmware size (%u) exceeds RAM size (%u)\n",
> fw_size, prog_ram_depth);
The RAM size on 8650's i2c master hub SEs is 1020 registers (correct,
not 1024) - Viken, would that be true for all implementations?
Konrad
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] soc: qcom: geni-se: ignore invalid PROG_RAM_DEPTH when checking for firmware size
2026-09-17 9:21 ` Konrad Dybcio
@ 2026-09-17 12:19 ` Neil Armstrong
0 siblings, 0 replies; 3+ messages in thread
From: Neil Armstrong @ 2026-09-17 12:19 UTC (permalink / raw)
To: Konrad Dybcio, Bjorn Andersson, Konrad Dybcio, Viken Dadhaniya
Cc: linux-arm-msm, linux-kernel
On 9/17/26 11:21, Konrad Dybcio wrote:
> On 9/17/26 11:07 AM, Neil Armstrong wrote:
>> The I2C Hub serial elements lacks DMA, so the SE_HW_PARAM_2 register which
>> is in the DMA register space doesn't exist for those instances.
>>
>> Simply ignore the ram depth if it return 0.
>>
>> Fixes: 522bfb4f33c0 ("soc: qcom: geni-se: Use HW PROG_RAM_DEPTH to validate firmware size")
>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>> ---
>> drivers/soc/qcom/qcom-geni-se.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/soc/qcom/qcom-geni-se.c b/drivers/soc/qcom/qcom-geni-se.c
>> index 873bfbd6b2b7..e75349f2c15d 100644
>> --- a/drivers/soc/qcom/qcom-geni-se.c
>> +++ b/drivers/soc/qcom/qcom-geni-se.c
>> @@ -1308,7 +1308,7 @@ static struct se_fw_hdr *geni_find_protocol_fw(struct geni_se *se, const struct
>>
>> prog_ram_depth = FIELD_GET(PROG_RAM_DEPTH_MSK,
>> readl_relaxed(se->base + SE_HW_PARAM_2));
>> - if (fw_size >= prog_ram_depth) {
>> + if (prog_ram_depth && fw_size >= prog_ram_depth) {
>> dev_err(dev, "Firmware size (%u) exceeds RAM size (%u)\n",
>> fw_size, prog_ram_depth);
>
> The RAM size on 8650's i2c master hub SEs is 1020 registers (correct,
> not 1024) - Viken, would that be true for all implementations?
Seems to be right for 8650, if all HUB Ses have 1020 I'll prepare
a v2 with the prog_ram_depth in the se_desc
Thanks,
Neil
>
> Konrad
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-17 12:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-17 9:07 [PATCH] soc: qcom: geni-se: ignore invalid PROG_RAM_DEPTH when checking for firmware size Neil Armstrong
2026-09-17 9:21 ` Konrad Dybcio
2026-09-17 12:19 ` Neil Armstrong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®