lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <06383015-51b2-4f4c-9fd8-e4f7ce12f44e@kernel.org>
Date: Thu, 25 Apr 2024 12:16:48 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Peter Griffin <peter.griffin@...aro.org>,
 Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
 Arnd Bergmann <arnd@...db.de>, lee@...nel.org
Cc: André Draszik <andre.draszik@...aro.org>,
 Vinod Koul <vkoul@...nel.org>, Kishon Vijay Abraham I <kishon@...nel.org>,
 Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
 Conor Dooley <conor+dt@...nel.org>,
 Marek Szyprowski <m.szyprowski@...sung.com>,
 Sylwester Nawrocki <s.nawrocki@...sung.com>,
 Alim Akhtar <alim.akhtar@...sung.com>,
 Sam Protsenko <semen.protsenko@...aro.org>,
 Tudor Ambarus <tudor.ambarus@...aro.org>,
 Will McVicker <willmcvicker@...gle.com>, Roy Luo <royluo@...gle.com>,
 kernel-team@...roid.com, linux-phy@...ts.infradead.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 2/7] phy: exynos5-usbdrd: use
 exynos_get_pmu_regmap_by_phandle() for PMU regs

On 25/04/2024 12:02, Peter Griffin wrote:
>> I prefer to keep the syscon
>> API and change the syscon driver to expose proper regmap. IOW, use
>> generic API syscon_regmap_lookup_by_phandle() and the type of regmap
>> returned is defined by the provider (so node pointed by phandle).
>>
> 
> @Arnd - any more thoughts on Krzysztof idea above ^^
> 
> @Krzysztof - I did speak to Arnd about the idea you proposed (or my
> understanding of it at least), which was external drivers like
> exynos-pmu or altera-sysmgr.c could create the regmap and register it
> with syscon so it can be returned by
> syscon_regmap_lookup_by_phandle(). Arnd's initial feedback was he
> would prefer to keep the complexity out of syscon, and have the client
> driver support multiple backends (so syscon-reboot for example would
> support using either syscon_regmap_lookup_by_phandle() or
> exynos_get_pmu_regmap_by_phandle() to obtain it's regmap). There were
> also some concerns about syscon having to probe very early for some
> platforms.

mfd/syscon.c is postcore_initcall, so it is not that very early,
although earlier than drivers. However it does not support deferred
probe and sometimes syscon providers might need clocks and resets.

One syscon consumer (so regular driver like phy here) might work with
different providers. E.g. on earlier arm and arm64 Exynos this was
simple regmap. On Google GS this is SMC. On some foo-bar it might be
call to hypervisor or something needing clocks.

For me therefore the syscon consumer is like regmap consumer. You do not
care who provides the regmap, just want i2c or mmio regmap. Of course
the specific driver, so the consumer of regmap, knows the type of regmap
it uses, so it requests i2c or mmio.

Here we want to hide two different interfaces - mmio and SMC - behind
one regmap. We solve it by using same regmap interface for consumer, but
different syscon calls returning different regmaps.

Anyway, I want to sort it out and have some sort of global policy,
before we start doing such changes for Google GS. I am sure soon
Qualcomm will come with their need for hypervisor quirks/regmaps etc.
And then TI will come with some need.

Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ