diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2017-04-21 07:24:32 -0700 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2017-05-17 17:11:46 +0800 |
commit | b727961b0706df57d408fe609cfe098a91626da3 (patch) | |
tree | 58950cda536d31379e6cb28486617ea71d18914e /arch/x86/include/asm/acpi_s3.h | |
parent | 1206723b6e597f1aa946b800fc59059db91908bc (diff) |
x86: Store and display previous sleep state
Add one member in the global data to store previous sleep state,
and display the state during boot in print_cpuinfo().
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'arch/x86/include/asm/acpi_s3.h')
-rw-r--r-- | arch/x86/include/asm/acpi_s3.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/x86/include/asm/acpi_s3.h b/arch/x86/include/asm/acpi_s3.h index ec052112f3..10cedde39a 100644 --- a/arch/x86/include/asm/acpi_s3.h +++ b/arch/x86/include/asm/acpi_s3.h @@ -37,6 +37,19 @@ enum acpi_sleep_state { }; /** + * acpi_ss_string() - get ACPI-defined sleep state string + * + * @pm1_cnt: ACPI-defined sleep state + * @return: a pointer to the sleep state string. + */ +static inline char *acpi_ss_string(enum acpi_sleep_state state) +{ + char *ss_string[] = { "S0", "S1", "S2", "S3", "S4", "S5"}; + + return ss_string[state]; +} + +/** * acpi_sleep_from_pm1() - get ACPI-defined sleep state from PM1_CNT register * * @pm1_cnt: PM1_CNT register value |