bool "Enable SCMI clock driver"
depends on CLK
depends on SCMI_FIRMWARE
+ select CLK_AUTO_ID if CLK_CCF
help
Enable this option if you want to support clock devices exposed
by a SCMI agent based on SCMI clock protocol communication
static int scmi_clk_gate(struct clk *clk, int enable)
{
struct scmi_clk_state_in in = {
- .clock_id = clk->id,
+ .clock_id = clk_get_id(clk),
.attributes = enable,
};
struct scmi_clk_state_out out;
static ulong scmi_clk_get_rate(struct clk *clk)
{
struct scmi_clk_rate_get_in in = {
- .clock_id = clk->id,
+ .clock_id = clk_get_id(clk),
};
struct scmi_clk_rate_get_out out;
struct scmi_msg msg = SCMI_MSG_IN(SCMI_PROTOCOL_ID_CLOCK,
static ulong __scmi_clk_set_rate(struct clk *clk, ulong rate)
{
struct scmi_clk_rate_set_in in = {
- .clock_id = clk->id,
+ .clock_id = clk_get_id(clk),
.flags = SCMI_CLK_RATE_ROUND_CLOSEST,
.rate_lsb = (u32)rate,
.rate_msb = (u32)((u64)rate >> 32),
return ret;
}
- clk_dm(i, &clk_scmi->clk);
+ dev_clk_dm(dev, i, &clk_scmi->clk);
if (CLK_HAS_RESTRICTIONS(attributes)) {
u32 perm;