platform: generic: Add system suspend test
authorAndrew Jones <ajones@ventanamicro.com>
Mon, 27 Feb 2023 10:31:06 +0000 (11:31 +0100)
committerAnup Patel <anup@brainfault.org>
Mon, 27 Feb 2023 14:20:51 +0000 (19:50 +0530)
commit5ccebf0a7ec79d0bbef36d6dcdc2717f25d40767
tree71c3f8bcaacef745452db2f8c7032913b72e05c3
parent37558dccbedbb571150630a910547a93d7ec8822
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>
docs/domain_support.md
include/sbi/sbi_system.h
lib/sbi/sbi_system.c
platform/generic/platform.c