Skip to content

Commit

Permalink
plat-sam: register CPU OPP clock for SCMI usage
Browse files Browse the repository at this point in the history
Add the definitinon for 'AT91_SCMI_CLK_CPU_OPP'.
When the CPU OPP clock is available, add it to SCMI clock list.

Signed-off-by: Tony Han <tony.han@microchip.com>
Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
  • Loading branch information
TonyHan11 committed Jun 21, 2024
1 parent 77c4192 commit d4585bd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/arch/arm/plat-sam/scmi_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,15 @@ static TEE_Result sam_init_scmi_clk(void)
return res;
}

clk = at91_cpu_opp_clk_get();
if (clk) {
res = scmi_clk_add(clk, 0, AT91_SCMI_CLK_CPU_OPP);
if (res) {
EMSG("Failed to add CPU OPP clock to SCMI clocks");
return res;
}
}

return TEE_SUCCESS;
}

Expand Down
1 change: 1 addition & 0 deletions core/include/dt-bindings/clock/at91.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
#define AT91_SCMI_CLK_PROG_PROG2 81

#define AT91_SCMI_CLK_SCKC_SLOWCK_32K 82
#define AT91_SCMI_CLK_CPU_OPP 101

#ifdef CFG_SAMA7G5
#define AT91_SCMI_CLK_CORE_CPUPLLCK 4
Expand Down

0 comments on commit d4585bd

Please sign in to comment.