From 5ccebf0a7ec79d0bbef36d6dcdc2717f25d40767 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Mon, 27 Feb 2023 11:31:06 +0100 Subject: 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 Reviewed-by: Anup Patel --- include/sbi/sbi_system.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') 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); -- cgit v1.2.3