aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/scmi_protocol.h
diff options
context:
space:
mode:
authorPeng Fan <peng.fan@nxp.com>2023-10-04 07:42:23 +0800
committerSudeep Holla <sudeep.holla@arm.com>2023-10-08 21:16:30 +0100
commit77bbfe607b1d306c88bf96fed00c030f6bf462f1 (patch)
tree1165e67a02f3c393f3217e6467404032d6f2cc72 /include/linux/scmi_protocol.h
parentclk: scmi: Free scmi_clk allocated when the clocks with invalid info are skipped (diff)
downloadwireguard-linux-77bbfe607b1d306c88bf96fed00c030f6bf462f1.tar.xz
wireguard-linux-77bbfe607b1d306c88bf96fed00c030f6bf462f1.zip
firmware: arm_scmi: Add support for clock parents
SCMI v3.2 spec introduces CLOCK_POSSIBLE_PARENTS_GET, CLOCK_PARENT_SET and CLOCK_PARENT_GET. Add support for these to enable clock parents and use them in the clock driver. Reviewed-by: Cristian Marussi <cristian.marussi@arm.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://lore.kernel.org/r/20231004-scmi-clock-v3-v5-1-1b8a1435673e@nxp.com Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'include/linux/scmi_protocol.h')
-rw-r--r--include/linux/scmi_protocol.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h
index 27bfa5a65b45..f2f05fb42d28 100644
--- a/include/linux/scmi_protocol.h
+++ b/include/linux/scmi_protocol.h
@@ -58,6 +58,8 @@ struct scmi_clock_info {
u64 step_size;
} range;
};
+ int num_parents;
+ u32 *parents;
};
enum scmi_power_scale {
@@ -83,6 +85,8 @@ struct scmi_protocol_handle;
* @state_get: get the status of the specified clock
* @config_oem_get: get the value of an OEM specific clock config
* @config_oem_set: set the value of an OEM specific clock config
+ * @parent_get: get the parent id of a clk
+ * @parent_set: set the parent of a clock
*/
struct scmi_clk_proto_ops {
int (*count_get)(const struct scmi_protocol_handle *ph);
@@ -104,6 +108,8 @@ struct scmi_clk_proto_ops {
bool atomic);
int (*config_oem_set)(const struct scmi_protocol_handle *ph, u32 clk_id,
u8 oem_type, u32 oem_val, bool atomic);
+ int (*parent_get)(const struct scmi_protocol_handle *ph, u32 clk_id, u32 *parent_id);
+ int (*parent_set)(const struct scmi_protocol_handle *ph, u32 clk_id, u32 parent_id);
};
struct scmi_perf_domain_info {