Re: [PATCH] soc: qcom: geni-se: ignore invalid PROG_RAM_DEPTH when checking for firmware size
From: Konrad Dybcio
Date: Thu Sep 17 2026 - 05:35:39 EST
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@xxxxxxxxxx>
> ---
> 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