Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <sboyd@kernel.org>
Cc: linux-clk@vger.kernel.org
Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>

+4 -4
+1 -1
drivers/clk/clk-scmi.c
··· 69 69 { 70 70 struct scmi_clk *clk = to_scmi_clk(hw); 71 71 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); 73 73 } 74 74 75 75 static int scmi_clk_enable(struct clk_hw *hw)
+2 -2
drivers/firmware/arm_scmi/clock.c
··· 218 218 } 219 219 220 220 static int scmi_clock_rate_set(const struct scmi_handle *handle, u32 clk_id, 221 - u32 config, u64 rate) 221 + u64 rate) 222 222 { 223 223 int ret; 224 224 struct scmi_xfer *t; ··· 230 230 return ret; 231 231 232 232 cfg = t->tx.buf; 233 - cfg->flags = cpu_to_le32(config); 233 + cfg->flags = cpu_to_le32(0); 234 234 cfg->id = cpu_to_le32(clk_id); 235 235 cfg->value_low = cpu_to_le32(rate & 0xffffffff); 236 236 cfg->value_high = cpu_to_le32(rate >> 32);
+1 -1
include/linux/scmi_protocol.h
··· 71 71 int (*rate_get)(const struct scmi_handle *handle, u32 clk_id, 72 72 u64 *rate); 73 73 int (*rate_set)(const struct scmi_handle *handle, u32 clk_id, 74 - u32 config, u64 rate); 74 + u64 rate); 75 75 int (*enable)(const struct scmi_handle *handle, u32 clk_id); 76 76 int (*disable)(const struct scmi_handle *handle, u32 clk_id); 77 77 };