[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADrjBPr154R_F46E1SL+7Gyv_3ukO9foU+gYu6D-EYnVbU6eAA@mail.gmail.com>
Date: Tue, 23 Jan 2024 15:35:11 +0000
From: Peter Griffin <peter.griffin@...aro.org>
To: Guenter Roeck <linux@...ck-us.net>
Cc: arnd@...db.de, robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org,
wim@...ux-watchdog.org, conor+dt@...nel.org, alim.akhtar@...sung.com,
jaewon02.kim@...sung.com, chanho61.park@...sung.com,
semen.protsenko@...aro.org, kernel-team@...roid.com, tudor.ambarus@...aro.org,
andre.draszik@...aro.org, saravanak@...gle.com, willmcvicker@...gle.com,
linux-fsd@...la.com, linux-watchdog@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-samsung-soc@...r.kernel.org
Subject: Re: [PATCH 3/9] watchdog: s3c2410_wdt: update to use new
exynos_pmu_*() apis
Hi Guenter,
Thanks for the review feedback.
On Tue, 23 Jan 2024 at 10:33, Guenter Roeck <linux@...ck-us.net> wrote:
>
> On 1/22/24 14:57, Peter Griffin wrote:
> > Instead of obtaining the PMU regmap directly use the new exynos_pmu_*()
> > APIs. The exynos_pmu_ APIs allow support of newer Exynos SoCs that have
> > atomic set/clear bit hardware and platforms where the PMU registers can
> > only be accessed via SMC call.
> >
>
> Not really sure about using a direect API instead of regmap. I personally
> think that regmap is more generic and like the idea of abstracting hardware
> accesses this way. Since that is POV, I won't argue about it. However,
I did also look into the possibility of a SMC backend to regmap but that was
already tried and nacked upstream previously.
>
> > As all platforms that have PMU registers use these new APIs, remove the
> > syscon regmap lookup code, as it is now redundant.
> >
>
> if syscon is now no longer needed, why keep selecting MFD_SYSCON below,
> and why are linux/mfd/syscon.h and linux/regmap.h still included ?
Good point, those headers and the select of MFD_SYSCON are now superfluous.
Will fix it in v2.
> Also, the driver did not previously only support ARCH_EXYNOS but also
> ARCH_S3C64XX and ARCH_S5PV210. It is not entirely (actually, not at all)
> clear to me if and how those platforms are now supported. EXYNOS_PMU
> still seems to depend on ARCH_EXYNOS. How can the driver select
> EXYNOS_PMU if ARCH_EXYNOS=n ?
>
> Also, ARCH_EXYNOS already selects EXYNOS_PMU, so a conditional
> "select EXYNOS_PMU if ARCH_EXYNOS" would not make sense (or be required)
> either.
>
> Please explain all the above.
Fixing this for ARCH_S3C64XX and ARCH_S5PV210 looks to be a case of
+++ b/drivers/watchdog/Kconfig
@@ -512,8 +512,6 @@ config S3C2410_WATCHDOG
tristate "S3C6410/S5Pv210/Exynos Watchdog"
depends on ARCH_S3C64XX || ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST
select WATCHDOG_CORE
- select MFD_SYSCON if ARCH_EXYNOS
- select EXYNOS_PMU
and fixing the return type in the stubs that Arnd pointed out.
static inline int exynos_pmu_write(unsigned int offset, unsigned int val)
{
- return ERR_PTR(-ENODEV);
+ return -ENODEV;
}
That then compiles OK with s5pv210_defconfig and s3c6400_defconfig.
Neither ARCH_S3C64XX or ARCH_S5PV210 have PMU registers or set the PMU
register quirk flags so none of the code for setting PMU registers
would get called at runtime on those platforms.
I can make the changes described above in v2 which should fix the
ARCH_S3C64XX and ARCH_S5PV210 compatibility.
Thanks,
Peter
Powered by blists - more mailing lists