[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <662c6a56055a295e3f9bd594b8751e405590abff.camel@linaro.org>
Date: Mon, 06 Oct 2025 07:45:27 +0100
From: André Draszik <andre.draszik@...aro.org>
To: Sam Protsenko <semen.protsenko@...aro.org>
Cc: Krzysztof Kozlowski <krzk@...nel.org>, Alim Akhtar
<alim.akhtar@...sung.com>, Peter Griffin <peter.griffin@...aro.org>, Tudor
Ambarus <tudor.ambarus@...aro.org>, Will McVicker
<willmcvicker@...gle.com>, kernel-team@...roid.com,
linux-arm-kernel@...ts.infradead.org, linux-samsung-soc@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] soc: samsung: exynos-pmu: allow specifying read &
write access tables for secure regmap
Hi Sam,
On Fri, 2025-10-03 at 12:22 -0500, Sam Protsenko wrote:
> On Thu, Oct 2, 2025 at 5:33 AM André Draszik <andre.draszik@...aro.org> wrote:
>
[...]
> >
> > diff --git a/drivers/soc/samsung/exynos-pmu.c b/drivers/soc/samsung/exynos-pmu.c
> > index 22c50ca2aa79bf1945255ee6cc7443d7309b2573..9f416de03610b1727d8cc77616e5c87e2525cc69 100644
> > --- a/drivers/soc/samsung/exynos-pmu.c
> > +++ b/drivers/soc/samsung/exynos-pmu.c
> > @@ -635,6 +635,9 @@ static int exynos_pmu_probe(struct platform_device *pdev)
> > pmu_regmcfg = regmap_smccfg;
> > pmu_regmcfg.max_register = resource_size(res) -
> > pmu_regmcfg.reg_stride;
> > + pmu_regmcfg.wr_table = pmu_context->pmu_data->wr_table;
> > + pmu_regmcfg.rd_table = pmu_context->pmu_data->rd_table;
> > +
>
> Seems like pmu_regmcfg declaration can be pulled under this "if" scope
> -- just a thought for future.
Yes, there is room for improvement. It might be even better if a platform could
provide its own regmap, rather than just a flag and the code here copying and
updating pmu_regmcfg.
I wanted to keep changes minimal at this stage, as there might be other considerations.
>
> > /* Need physical address for SMC call */
> > regmap = devm_regmap_init(dev, NULL,
> > (void *)(uintptr_t)res->start,
> > diff --git a/drivers/soc/samsung/exynos-pmu.h b/drivers/soc/samsung/exynos-pmu.h
> > index 0938bb4fe15f439e2d8bddeec51b6077e79a7e84..113149ed32c88a09b075be82050c26970e4c0620 100644
> > --- a/drivers/soc/samsung/exynos-pmu.h
> > +++ b/drivers/soc/samsung/exynos-pmu.h
> > @@ -27,6 +27,10 @@ struct exynos_pmu_data {
> > void (*pmu_init)(void);
> > void (*powerdown_conf)(enum sys_powerdown);
> > void (*powerdown_conf_extra)(enum sys_powerdown);
> > +
> > + /* for the pmu_secure case */
> > + const struct regmap_access_table *rd_table;
> > + const struct regmap_access_table *wr_table;
>
> Maybe it's worth to add #include <linux/regmap.h> in this header, or
> at least forward declaration struct regmap_access_table?
Thanks! I'll add the forward declaration, as not all users of this header need
regmap.
> Also, would be nice to have kernel-doc comment for struct
> exynos_pmu_data at this point, but it might be out of scope for this
> patch.
>
> Other than those minor nitpicks -- LGTM:
I'll add something for the next version.
Cheers,
Andre'
Powered by blists - more mailing lists