Merge tag 'arm-dt-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
[linux-2.6-microblaze.git] / drivers / firmware / arm_scmi / protocols.h
index c679f3f..2f3bf69 100644 (file)
@@ -179,6 +179,8 @@ struct scmi_protocol_handle {
  * @max_resources: Maximum acceptable number of items, configured by the caller
  *                depending on the underlying resources that it is querying.
  * @loop_idx: The iterator loop index in the current multi-part reply.
+ * @rx_len: Size in bytes of the currenly processed message; it can be used by
+ *         the user of the iterator to verify a reply size.
  * @priv: Optional pointer to some additional state-related private data setup
  *       by the caller during the iterations.
  */
@@ -188,6 +190,7 @@ struct scmi_iterator_state {
        unsigned int num_remaining;
        unsigned int max_resources;
        unsigned int loop_idx;
+       size_t rx_len;
        void *priv;
 };
 
@@ -212,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
@@ -227,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,
@@ -236,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);
 };
 
 /**
@@ -312,5 +337,6 @@ DECLARE_SCMI_REGISTER_UNREGISTER(reset);
 DECLARE_SCMI_REGISTER_UNREGISTER(sensors);
 DECLARE_SCMI_REGISTER_UNREGISTER(voltage);
 DECLARE_SCMI_REGISTER_UNREGISTER(system);
+DECLARE_SCMI_REGISTER_UNREGISTER(powercap);
 
 #endif /* _SCMI_PROTOCOLS_H */