mirror of
https://github.com/Fishwaldo/opensbi.git
synced 2025-06-22 22:28:19 +00:00
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>
This commit is contained in:
parent
37558dccbe
commit
5ccebf0a7e
4 changed files with 55 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue