Hi Marek,

On Mon, Oct 27, 2025 at 02:58:29PM +0100, Marek Vasut wrote:
>From: Vinh Nguyen <[email protected]>
>
>SCMI v3.2 introduces a new clock CONFIG_SET message format that can
>optionally carry also OEM specific configuration values beside the usual
>clock enable/disable requests. Add support to use such new format when
>talking to a v3.2 compliant SCMI platform.
>
>Support existing enable/disable operations across different clock protocol
>versions: this patch still does not add protocol operations to support the
>new OEM specific optional configuration capabilities.
>
>No functional change for the SCMI drivers users of the related enable and
>disable clock operations.
>
>Signed-off-by: Vinh Nguyen <[email protected]>
>Signed-off-by: Marek Vasut <[email protected]>
>[Marek: Remodel after Linux e49e314a2cf7 ("firmware: arm_scmi: Add clock v3.2 
>CONFIG_SET support")
>        Support both old < 2.1 and new >= 2.1 protocol versions.
>       Update commit message based on Linux one]
>---
>Cc: Alice Guo <[email protected]>
>Cc: Cristian Marussi <[email protected]>
>Cc: Patrice Chotard <[email protected]>
>Cc: Patrick Delaunay <[email protected]>
>Cc: Peng Fan <[email protected]>
>Cc: Sean Anderson <[email protected]>
>Cc: Tom Rini <[email protected]>
>Cc: Valentin Caron <[email protected]>
>Cc: Vinh Nguyen <[email protected]>
>Cc: Ye Li <[email protected]>
>Cc: [email protected]
>---
>V2: Fix up iMX95 and sandbox after rework
>---
> arch/arm/mach-imx/imx9/scmi/clock_scmi.c   |  2 +-
> drivers/clk/clk_scmi.c                     | 22 +++++++++++++++++-----
> drivers/firmware/scmi/sandbox-scmi_agent.c |  4 ++--
> include/scmi_protocols.h                   | 17 +++++++++++++++--
> 4 files changed, 35 insertions(+), 10 deletions(-)
>
>diff --git a/arch/arm/mach-imx/imx9/scmi/clock_scmi.c 
>b/arch/arm/mach-imx/imx9/scmi/clock_scmi.c
>index fa15b5f8df9..fc1d5d77799 100644
>--- a/arch/arm/mach-imx/imx9/scmi/clock_scmi.c
>+++ b/arch/arm/mach-imx/imx9/scmi/clock_scmi.c
>@@ -10,7 +10,7 @@
> 
> int imx_clk_scmi_enable(u32 clock_id, bool enable)
> {
>-      struct scmi_clk_state_in in = {
>+      struct scmi_clk_state_in_v1 in = {
>               .clock_id = clock_id,
>               .attributes = (enable) ? 1 : 0,
>       };
>diff --git a/drivers/clk/clk_scmi.c b/drivers/clk/clk_scmi.c
>index a7d89f32cd7..f9e17c38cad 100644
>--- a/drivers/clk/clk_scmi.c
>+++ b/drivers/clk/clk_scmi.c
>@@ -134,17 +134,29 @@ static int scmi_clk_get_attibute(struct udevice *dev, 
>int clkid, char **name,
> 
> static int scmi_clk_gate(struct clk *clk, int enable)
> {
>-      struct scmi_clk_state_in in = {
>+      struct scmi_clock_priv *priv = dev_get_priv(clk->dev->parent);

This should be changed to find the protocol@14 device, because
assigned-clock-parents could change the scmi clk parent.

Thanks,
Peng

Reply via email to