[coreboot-gerrit] Change in coreboot[master]: amd/stoneyridge: Use the new generic acpi_sleep_from_pm1

Marshall Dawson (Code Review) gerrit at coreboot.org
Fri Nov 10 01:31:24 CET 2017


Marshall Dawson has uploaded this change for review. ( https://review.coreboot.org/22410


Change subject: amd/stoneyridge: Use the new generic acpi_sleep_from_pm1
......................................................................

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 <marshalldawson3rd at gmail.com>
---
M src/soc/amd/stoneyridge/southbridge.c
1 file changed, 1 insertion(+), 3 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/10/22410/1

diff --git a/src/soc/amd/stoneyridge/southbridge.c b/src/soc/amd/stoneyridge/southbridge.c
index b947be1..a7d80c6 100644
--- a/src/soc/amd/stoneyridge/southbridge.c
+++ b/src/soc/amd/stoneyridge/southbridge.c
@@ -33,9 +33,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)

-- 
To view, visit https://review.coreboot.org/22410
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icd49c44fae43effb9f082db354abd327cad9f1ad
Gerrit-Change-Number: 22410
Gerrit-PatchSet: 1
Gerrit-Owner: Marshall Dawson <marshalldawson3rd at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20171110/1ea60605/attachment-0001.html>


More information about the coreboot-gerrit mailing list