diff options
author | Cristian Marussi <cristian.marussi@arm.com> | 2022-07-04 11:22:37 +0100 |
---|---|---|
committer | Sudeep Holla <sudeep.holla@arm.com> | 2022-07-04 14:28:42 +0100 |
commit | 6f9ea4dabd2d8831b470660a83fa09966933f850 (patch) | |
tree | 1d731ae1852a7670e3634e5b93854a974c0c924d /drivers/firmware/arm_scmi/protocols.h | |
parent | 0316f99c4780b0a5fd60b7f136c64cb1af8d5fc3 (diff) | |
download | linux-6f9ea4dabd2d8831b470660a83fa09966933f850.tar.gz linux-6f9ea4dabd2d8831b470660a83fa09966933f850.tar.bz2 linux-6f9ea4dabd2d8831b470660a83fa09966933f850.zip |
firmware: arm_scmi: Generalize the fast channel support
Generalize existing fast channel support used in the perf protocol and
make it available to possibly any protocol refactoring the common code
into a couple of new scmi_proto_helpers_ops routines.
Make perf protocol use this new infrastructure.
No functional change.
Link: https://lore.kernel.org/r/20220704102241.2988447-4-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'drivers/firmware/arm_scmi/protocols.h')
-rw-r--r-- | drivers/firmware/arm_scmi/protocols.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/firmware/arm_scmi/protocols.h b/drivers/firmware/arm_scmi/protocols.h index 99d36d503d1e..2f3bf691db7c 100644 --- a/drivers/firmware/arm_scmi/protocols.h +++ b/drivers/firmware/arm_scmi/protocols.h @@ -215,6 +215,19 @@ struct scmi_iterator_ops { struct scmi_iterator_state *st, void *priv); }; +struct scmi_fc_db_info { + int width; + u64 set; + u64 mask; + void __iomem *addr; +}; + +struct scmi_fc_info { + void __iomem *set_addr; + void __iomem *get_addr; + struct scmi_fc_db_info *set_db; +}; + /** * struct scmi_proto_helpers_ops - References to common protocol helpers * @extended_name_get: A common helper function to retrieve extended naming @@ -230,6 +243,9 @@ struct scmi_iterator_ops { * provided in @ops. * @iter_response_run: A common helper to trigger the run of a previously * initialized iterator. + * @fastchannel_init: A common helper used to initialize FC descriptors by + * gathering FC descriptions from the SCMI platform server. + * @fastchannel_db_ring: A common helper to ring a FC doorbell. */ struct scmi_proto_helpers_ops { int (*extended_name_get)(const struct scmi_protocol_handle *ph, @@ -239,6 +255,12 @@ struct scmi_proto_helpers_ops { unsigned int max_resources, u8 msg_id, size_t tx_size, void *priv); int (*iter_response_run)(void *iter); + void (*fastchannel_init)(const struct scmi_protocol_handle *ph, + u8 describe_id, u32 message_id, + u32 valid_size, u32 domain, + void __iomem **p_addr, + struct scmi_fc_db_info **p_db); + void (*fastchannel_db_ring)(struct scmi_fc_db_info *db); }; /** |