Skip to content

Commit d0aba11

Browse files
committed
firmware: arm_scmi: Drop config flag in clk_ops->rate_set
CLOCK_PROTOCOL_ATTRIBUTES provides attributes to indicate the maximum number of pending asynchronous clock rate changes supported by the platform. If it's non-zero, then we should be able to use asynchronous clock rate set for any clocks until the maximum limit is reached. In order to add that support, let's drop the config flag passed to clk_ops->rate_set and handle the asynchronous requests dynamically. Cc: Stephen Boyd <[email protected]> Cc: [email protected] Acked-by: Stephen Boyd <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
1 parent d09aac0 commit d0aba11

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

drivers/clk/clk-scmi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static int scmi_clk_set_rate(struct clk_hw *hw, unsigned long rate,
6969
{
7070
struct scmi_clk *clk = to_scmi_clk(hw);
7171

72-
return clk->handle->clk_ops->rate_set(clk->handle, clk->id, 0, rate);
72+
return clk->handle->clk_ops->rate_set(clk->handle, clk->id, rate);
7373
}
7474

7575
static int scmi_clk_enable(struct clk_hw *hw)

drivers/firmware/arm_scmi/clock.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ scmi_clock_rate_get(const struct scmi_handle *handle, u32 clk_id, u64 *value)
218218
}
219219

220220
static int scmi_clock_rate_set(const struct scmi_handle *handle, u32 clk_id,
221-
u32 config, u64 rate)
221+
u64 rate)
222222
{
223223
int ret;
224224
struct scmi_xfer *t;
@@ -230,7 +230,7 @@ static int scmi_clock_rate_set(const struct scmi_handle *handle, u32 clk_id,
230230
return ret;
231231

232232
cfg = t->tx.buf;
233-
cfg->flags = cpu_to_le32(config);
233+
cfg->flags = cpu_to_le32(0);
234234
cfg->id = cpu_to_le32(clk_id);
235235
cfg->value_low = cpu_to_le32(rate & 0xffffffff);
236236
cfg->value_high = cpu_to_le32(rate >> 32);

include/linux/scmi_protocol.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ struct scmi_clk_ops {
7171
int (*rate_get)(const struct scmi_handle *handle, u32 clk_id,
7272
u64 *rate);
7373
int (*rate_set)(const struct scmi_handle *handle, u32 clk_id,
74-
u32 config, u64 rate);
74+
u64 rate);
7575
int (*enable)(const struct scmi_handle *handle, u32 clk_id);
7676
int (*disable)(const struct scmi_handle *handle, u32 clk_id);
7777
};

0 commit comments

Comments
 (0)