From f9592ccef09821b5b5cb0c8245bded4c8c339c51 Mon Sep 17 00:00:00 2001 From: Marshall Dawson Date: Thu, 9 Nov 2017 16:55:31 -0700 Subject: amd/stoneyridge: Use the new generic acpi_sleep_from_pm1 Unhardcode the acpi_get_sleep_type() function and rely on the new function in arch/acpi.h. Change-Id: Icd49c44fae43effb9f082db354abd327cad9f1ad Signed-off-by: Marshall Dawson Reviewed-on: https://review.coreboot.org/22410 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Marc Jones --- src/soc/amd/stoneyridge/southbridge.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/soc/amd/stoneyridge/southbridge.c') diff --git a/src/soc/amd/stoneyridge/southbridge.c b/src/soc/amd/stoneyridge/southbridge.c index 8ea53012a2..0d96b5f773 100644 --- a/src/soc/amd/stoneyridge/southbridge.c +++ b/src/soc/amd/stoneyridge/southbridge.c @@ -32,9 +32,7 @@ int acpi_get_sleep_type(void) { - u16 tmp = inw(ACPI_PM1_CNT_BLK); - tmp = ((tmp & (7 << 10)) >> 10); - return (int)tmp; + return acpi_sleep_from_pm1(inw(pm_acpi_pm_cnt_blk())); } void sb_enable(device_t dev) -- cgit v1.2.3