[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250528150845.GC1484967@horms.kernel.org>
Date: Wed, 28 May 2025 16:08:45 +0100
From: Simon Horman <horms@...nel.org>
To: Konrad Dybcio <konradybcio@...nel.org>
Cc: Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Alex Elder <elder@...nel.org>,
Marijn Suijten <marijn.suijten@...ainline.org>,
linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
Konrad Dybcio <konrad.dybcio@....qualcomm.com>,
Alex Elder <elder@...cstar.com>,
Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
Subject: Re: [PATCH net-next v2 3/3] net: ipa: Grab IMEM slice base/size from
DTS
On Tue, May 27, 2025 at 01:26:43PM +0200, Konrad Dybcio wrote:
> From: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
>
> This is a detail that differ per chip, and not per IPA version (and
> there are cases of the same IPA versions being implemented across very
> very very different SoCs).
>
> This region isn't actually used by the driver, but we most definitely
> want to iommu-map it, so that IPA can poke at the data within.
>
> Reviewed-by: Alex Elder <elder@...cstar.com>
> Acked-by: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
...
> diff --git a/drivers/net/ipa/ipa_mem.c b/drivers/net/ipa/ipa_mem.c
...
> @@ -656,7 +659,23 @@ int ipa_mem_init(struct ipa *ipa, struct platform_device *pdev,
> ipa->mem_addr = res->start;
> ipa->mem_size = resource_size(res);
>
> - ret = ipa_imem_init(ipa, mem_data->imem_addr, mem_data->imem_size);
> + ipa_slice_np = of_parse_phandle(dev->of_node, "sram", 0);
> + if (ipa_slice_np) {
> + ret = of_address_to_resource(ipa_slice_np, 0, res);
> + of_node_put(ipa_slice_np);
> + if (ret)
> + return ret;
> +
> + imem_base = res->start;
> + imem_size = resource_size(res);
> + } else {
> + /* Backwards compatibility for DTs lacking
> + * an explicit reference */
> + imem_base = mem_data->imem_addr;
> + imem_size = mem_data->imem_size;
> + }
> +
> + ret = ipa_imem_init(ipa, imem_base, imem_size);
Thanks for the update to use imem_base and imem_size on the line above.
Reviewed-by: Simon Horman <horms@...nel.org>
Powered by blists - more mailing lists