Angel Pons | 182dbde | 2020-04-02 23:49:05 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | /* This file is part of the coreboot project. */ |
Kyösti Mälkki | 78c5d58 | 2015-01-09 23:48:47 +0200 | [diff] [blame] | 3 | |
| 4 | #include <stdint.h> |
| 5 | #include <arch/io.h> |
Furquan Shaikh | 76cedd2 | 2020-05-02 10:24:23 -0700 | [diff] [blame^] | 6 | #include <acpi/acpi.h> |
Kyösti Mälkki | 78c5d58 | 2015-01-09 23:48:47 +0200 | [diff] [blame] | 7 | #include <cbmem.h> |
| 8 | #include "SBPLATFORM.h" |
| 9 | |
| 10 | int acpi_get_sleep_type(void) |
| 11 | { |
| 12 | u16 tmp = inw(PM1_CNT_BLK_ADDRESS); |
| 13 | tmp = ((tmp & (7 << 10)) >> 10); |
| 14 | return (int)tmp; |
| 15 | } |