From 3a7de79885e693526f33e892de095b980116ac49 Mon Sep 17 00:00:00 2001 From: Marshall Dawson Date: Thu, 16 Nov 2017 09:14:15 -0700 Subject: 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 Reviewed-on: https://review.coreboot.org/22722 Tested-by: build bot (Jenkins) Reviewed-by: Richard Spiegel Reviewed-by: Martin Roth --- src/soc/amd/stoneyridge/sb_util.c | 6 ++++++ src/soc/amd/stoneyridge/southbridge.c | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/soc/amd/stoneyridge') 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 #include 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 #include -#include #include #include #include @@ -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__); -- cgit v1.2.3