mbox series

[v2,0/6] Add SCMI v3.2 Clock new CONFIGs support

Message ID 20230826125308.462328-1-cristian.marussi@arm.com (mailing list archive)
Headers show
Series Add SCMI v3.2 Clock new CONFIGs support | expand

Message

Cristian Marussi Aug. 26, 2023, 12:53 p.m. UTC
Hi all,

this small series introduces support for the new Clock CONFIG features
added by SCMI v3.2 specification [1].

It does NOT add support, still, for the SCMI v3.2 Clock reparenting
features added in v3.2 too.

After a small refactoring in [1/6], support for the new CONFIG_SET message
format is added in [2/6]: this is just internal rework to support new and
legacy (pre-v3.2) message formats.

Patch [3/6] adds support for the new v3.2 CONFIG_GET command and adds a new
related Clock operation .state_get() to retrieve the enabled state of one
clock when talking to a v3.2 compliant server.

Patch [4/6] extend .state_get() support to legacy SCMI platforms implementing
pre-v3.2 SCMI stacks: in such a scenario we can use the old CLOCK_ATTRIBUTES
command to retrieve the clock state.

Patch [5/6] finally wires up this new .state_get() clock operation to the
Linux Clock framework .is_enabled() callback, AS-LONG-AS the underlying
configured SCMI stack supports atomic operations. (since .is_enabled() is
required not to sleep)
This *should* ease unused clocks management by the Linux Clock framework.

Last but not least, patch [6/6] exposes a couple more SCMI Clock operations
in order to be able to set/get OEM specific clock configuration values as
described in SCMI v3.2 specification.

Tested on JUNO and on an SCMI emulation setup.

Based on v6.5-rc5.

Any feedback welcome,

Thanks,
Cristian

[1]: https://developer.arm.com/documentation/den0056/e

----
v1 --> v2
- more descriptive commit message for 1/6
- add and use more descriptive defines to name boolean arguments in clk-scmi.c
- dropped RFC from 6/6


Cristian Marussi (6):
  firmware: arm_scmi: Simplify enable/disable Clock operations
  firmware: arm_scmi: Add Clock v3.2 CONFIG_SET support
  firmware: arm_scmi: Add v3.2 Clock CONFIG_GET support
  firmware: arm_scmi: Add Clock .state_get support to pre-v3.2
  clk: scmi: Add support for .is_enabled clk_ops
  firmware: arm_scmi: Add Clock OEM config clock operations

 drivers/clk/clk-scmi.c            |  34 ++++-
 drivers/firmware/arm_scmi/clock.c | 220 +++++++++++++++++++++++++++---
 include/linux/scmi_protocol.h     |  19 ++-
 3 files changed, 243 insertions(+), 30 deletions(-)

Comments

Sudeep Holla Sept. 21, 2023, 1:54 p.m. UTC | #1
On Sat, 26 Aug 2023 13:53:02 +0100, Cristian Marussi wrote:
> this small series introduces support for the new Clock CONFIG features
> added by SCMI v3.2 specification [1].
> 
> It does NOT add support, still, for the SCMI v3.2 Clock reparenting
> features added in v3.2 too.
> 
> After a small refactoring in [1/6], support for the new CONFIG_SET message
> format is added in [2/6]: this is just internal rework to support new and
> legacy (pre-v3.2) message formats.
> 
> [...]

Applied to sudeep.holla/linux (for-next/scmi/updates), thanks!

[1/6] firmware: arm_scmi: Simplify enable/disable Clock operations
      https://git.kernel.org/sudeep.holla/c/03a95cf233b5
[2/6] firmware: arm_scmi: Add Clock v3.2 CONFIG_SET support
      https://git.kernel.org/sudeep.holla/c/e49e314a2cf7
[3/6] firmware: arm_scmi: Add v3.2 Clock CONFIG_GET support
      https://git.kernel.org/sudeep.holla/c/34592bf0a5cb
[4/6] firmware: arm_scmi: Add Clock .state_get support to pre-v3.2
      https://git.kernel.org/sudeep.holla/c/5b8a8ca37e49
[5/6] clk: scmi: Add support for .is_enabled clk_ops
      https://git.kernel.org/sudeep.holla/c/1b39ff5140c9
[6/6] firmware: arm_scmi: Add Clock OEM config clock operations
      https://git.kernel.org/sudeep.holla/c/141b4fa03625
--
Regards,
Sudeep