drivers/soc/qcom/qcom-geni-se.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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>
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
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
© 2016 - 2026 Red Hat, Inc.