summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Jones <ajones@ventanamicro.com>2023-02-27 13:31:06 +0300
committerAnup Patel <anup@brainfault.org>2023-02-27 17:20:51 +0300
commit5ccebf0a7ec79d0bbef36d6dcdc2717f25d40767 (patch)
tree71c3f8bcaacef745452db2f8c7032913b72e05c3 /include
parent37558dccbedbb571150630a910547a93d7ec8822 (diff)
downloadopensbi-5ccebf0a7ec79d0bbef36d6dcdc2717f25d40767.tar.xz
platform: generic: Add system suspend test
When the system-suspend-test property is present in the domain config node as shown below, implement system suspend with a simple 5 second delay followed by a WFI. This allows testing system suspend when the low-level firmware doesn't support it. / { chosen { opensbi-domains { compatible = "opensbi,domain,config"; system-suspend-test; }; Signed-off-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'include')
-rw-r--r--include/sbi/sbi_system.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sbi/sbi_system.h b/include/sbi/sbi_system.h
index 11d3d6f..33ff7f1 100644
--- a/include/sbi/sbi_system.h
+++ b/include/sbi/sbi_system.h
@@ -66,6 +66,7 @@ struct sbi_system_suspend_device {
const struct sbi_system_suspend_device *sbi_system_suspend_get_device(void);
void sbi_system_suspend_set_device(struct sbi_system_suspend_device *dev);
+void sbi_system_suspend_test_enable(void);
bool sbi_system_suspend_supported(u32 sleep_type);
int sbi_system_suspend(u32 sleep_type, ulong resume_addr, ulong opaque);