[PATCH v4 5/8] clk: add clock driver for SCMI agents
Simon Glass
sjg at chromium.org
Thu Sep 10 15:38:28 CEST 2020
On Wed, 9 Sep 2020 at 10:44, Etienne Carriere
<etienne.carriere at linaro.org> wrote:
>
> This change introduces a clock driver for SCMI agent devices. When
> SCMI agent and SCMI clock drivers are enabled, SCMI agent binds a
> clock device for each SCMI clock protocol devices enabled in the FDT.
>
> SCMI clock driver is embedded upon CONFIG_CLK_SCMI=y. If enabled,
> CONFIG_SCMI_AGENT is also enabled.
>
> SCMI Clock protocol is defined in the SCMI specification [1].
>
> Links: [1] https://developer.arm.com/architectures/system-architectures/software-standards/scmi
> Signed-off-by: Etienne Carriere <etienne.carriere at linaro.org>
> Cc: Lukasz Majewski <lukma at denx.de>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Peng Fan <peng.fan at nxp.com>
> Cc: Sudeep Holla <sudeep.holla at arm.com>
> ---
>
> Changes in v4:
> - Condition DM_GET_DRIVER(scmi_clock) to IS_ENABLED(CONFIG_CLK_SCMI)
> to prevent a build error (linker) when CONFIG_CLK_SCMI is disabled.
>
> Changes in v3:
> - Rebased in the series without major conflict.
>
> Changes in v2:
> - CONFIG_CLK_SCMI depends on CONFIG_SCMI_FIRMWARE instead of
> selecting CONFIG_SCMI_FIRMWARE.
> - Add inline comment description for structures and moves them to
> source file top. Add/fixup some functions inline description comments.
> - Replace rc with ret as return value local variable label.
> - Fix scmi_clk_get_rate() return value to propagate error number.
> - Fix scmi_clk_set_rate() to request synchronous rate set operation:
> drop flag SCMI_CLK_RATE_ASYNC_NORESP in the SCMI message payload.
> - Fix scmi_clk_set_rate() return value to return clock effective rate
> on success.
> ---
> drivers/clk/Kconfig | 8 ++
> drivers/clk/Makefile | 1 +
> drivers/clk/clk_scmi.c | 99 +++++++++++++++++++++++
> drivers/firmware/scmi/scmi_agent-uclass.c | 14 +++-
> include/scmi_protocols.h | 78 ++++++++++++++++++
> 5 files changed, 197 insertions(+), 3 deletions(-)
> create mode 100644 drivers/clk/clk_scmi.c
Reviewed-by: Simon Glass <sjg at chromium.org>
More information about the U-Boot
mailing list