summaryrefslogtreecommitdiff
path: root/include/linux/scmi_protocol.h
diff options
context:
space:
mode:
authorCristian Marussi <cristian.marussi@arm.com>2020-09-07 18:46:55 +0100
committerSudeep Holla <sudeep.holla@arm.com>2020-09-08 16:00:55 +0100
commita8803055127afb87640974adedac60435592b86d (patch)
treeed407fca6c7e362f569107ce84849c7780a2bde9 /include/linux/scmi_protocol.h
parent3de7b83017bd93d521dc29f475f4c8fc5d61e518 (diff)
firmware: arm_scmi: Add system power protocol support
Add bare protocol support for SCMI system power protocol as needed by an OSPM agent: basic initialization and SYSTEM_POWER_STATE_NOTIFIER core notification support. No event-handling logic is attached to such notification.. Link: https://lore.kernel.org/r/20200907174657.32466-2-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 'include/linux/scmi_protocol.h')
-rw-r--r--include/linux/scmi_protocol.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h
index 05570afc7f74..4b10093ad671 100644
--- a/include/linux/scmi_protocol.h
+++ b/include/linux/scmi_protocol.h
@@ -292,6 +292,7 @@ struct scmi_handle {
void *sensor_priv;
void *reset_priv;
void *notify_priv;
+ void *system_priv;
};
enum scmi_std_protocol {
@@ -304,6 +305,15 @@ enum scmi_std_protocol {
SCMI_PROTOCOL_RESET = 0x16,
};
+enum scmi_system_events {
+ SCMI_SYSTEM_SHUTDOWN,
+ SCMI_SYSTEM_COLDRESET,
+ SCMI_SYSTEM_WARMRESET,
+ SCMI_SYSTEM_POWERUP,
+ SCMI_SYSTEM_SUSPEND,
+ SCMI_SYSTEM_MAX
+};
+
struct scmi_device {
u32 id;
u8 protocol_id;
@@ -378,6 +388,7 @@ enum scmi_notification_events {
SCMI_EVENT_SENSOR_TRIP_POINT_EVENT = 0x0,
SCMI_EVENT_RESET_ISSUED = 0x0,
SCMI_EVENT_BASE_ERROR_EVENT = 0x0,
+ SCMI_EVENT_SYSTEM_POWER_STATE_NOTIFIER = 0x0,
};
struct scmi_power_state_changed_report {
@@ -387,6 +398,13 @@ struct scmi_power_state_changed_report {
unsigned int power_state;
};
+struct scmi_system_power_state_notifier_report {
+ ktime_t timestamp;
+ unsigned int agent_id;
+ unsigned int flags;
+ unsigned int system_state;
+};
+
struct scmi_perf_limits_report {
ktime_t timestamp;
unsigned int agent_id;