Marshall Dawson has uploaded this change for review. ( https://review.coreboot.org/22722
Change subject: amd/stoneyrige: Move acpi_get_sleep_type to sb_util ......................................................................
amd/stoneyrige: 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 --- M src/soc/amd/stoneyridge/sb_util.c M src/soc/amd/stoneyridge/southbridge.c 2 files changed, 6 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/22/22722/1
diff --git a/src/soc/amd/stoneyridge/sb_util.c b/src/soc/amd/stoneyridge/sb_util.c index f7c6b45..36dccaa 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) @@ -84,3 +85,8 @@ { return pm_read16(PM_EVT_BLK); } + +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 dbf27bc..5010e9b 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> @@ -275,11 +274,6 @@ printk(BIOS_DEBUG, "Loading %x of size %d to nvram pos:%d\n", *old_dword, size, nvram_pos-size); 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)