diff options
author | Marshall Dawson <marshalldawson3rd@gmail.com> | 2017-11-16 09:14:15 -0700 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2018-01-19 19:47:55 +0000 |
commit | 3a7de79885e693526f33e892de095b980116ac49 (patch) | |
tree | bfe51c3b543c156494a81ee24ac7c2c10bb90b3d | |
parent | 2d51dd662526eef23766d7c4299fd7555a7876bf (diff) |
amd/stoneyridge: Move acpi_get_sleep_type to sb_util
Relocate the acpi_get_sleep_type() function out of the southbridge
ramstage file. This will make it more convenient for using elsewhere.
Change-Id: Id7ba709bb867fb00ed6c7fa7526de087a3b9b3ca
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/22722
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-by: Martin Roth <martinroth@google.com>
-rw-r--r-- | src/soc/amd/stoneyridge/sb_util.c | 6 | ||||
-rw-r--r-- | src/soc/amd/stoneyridge/southbridge.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/soc/amd/stoneyridge/sb_util.c b/src/soc/amd/stoneyridge/sb_util.c index 8862b1710b..e394432d4a 100644 --- a/src/soc/amd/stoneyridge/sb_util.c +++ b/src/soc/amd/stoneyridge/sb_util.c @@ -13,6 +13,7 @@ * GNU General Public License for more details. */ +#include <arch/acpi.h> #include <soc/southbridge.h> void pm_write8(u8 reg, u8 value) @@ -114,3 +115,8 @@ uint32_t xhci_pm_read32(uint8_t reg) { return read32((void *)(XHCI_ACPI_PM_MMIO_BASE + reg)); } + +int acpi_get_sleep_type(void) +{ + return acpi_sleep_from_pm1(inw(pm_acpi_pm_cnt_blk())); +} diff --git a/src/soc/amd/stoneyridge/southbridge.c b/src/soc/amd/stoneyridge/southbridge.c index 1357257ea9..2dd0251503 100644 --- a/src/soc/amd/stoneyridge/southbridge.c +++ b/src/soc/amd/stoneyridge/southbridge.c @@ -16,7 +16,6 @@ #include <console/console.h> #include <arch/io.h> -#include <arch/acpi.h> #include <bootstate.h> #include <cpu/x86/smm.h> #include <device/device.h> @@ -483,11 +482,6 @@ int s3_load_nvram_early(int size, u32 *old_dword, int nvram_pos) return nvram_pos; } -int acpi_get_sleep_type(void) -{ - return acpi_sleep_from_pm1(inw(pm_acpi_pm_cnt_blk())); -} - void sb_enable(device_t dev) { printk(BIOS_DEBUG, "%s\n", __func__); |