Marshall Dawson has uploaded this change for review.

View Change

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: I1aa2ad067a8f837df713b5883d7fc80a229edd65
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
---
M src/soc/amd/stoneyridge/Makefile.inc
M src/soc/amd/stoneyridge/sb_util.c
M src/soc/amd/stoneyridge/southbridge.c
3 files changed, 7 insertions(+), 6 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/45/22645/1
diff --git a/src/soc/amd/stoneyridge/Makefile.inc b/src/soc/amd/stoneyridge/Makefile.inc
index d2a0db4..24994d4 100644
--- a/src/soc/amd/stoneyridge/Makefile.inc
+++ b/src/soc/amd/stoneyridge/Makefile.inc
@@ -51,6 +51,7 @@
romstage-y += gpio.c
romstage-$(CONFIG_STONEYRIDGE_IMC_FWM) += imc.c
romstage-y += pmutil.c
+romstage-y += sb_util.c
romstage-y += smbus.c
romstage-y += smbus_spd.c
romstage-y += ramtop.c
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 600b064..9df7655 100644
--- a/src/soc/amd/stoneyridge/southbridge.c
+++ b/src/soc/amd/stoneyridge/southbridge.c
@@ -29,12 +29,6 @@
#include <soc/smi.h>
#include <fchec.h>

-
-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__);

To view, visit change 22645. To unsubscribe, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1aa2ad067a8f837df713b5883d7fc80a229edd65
Gerrit-Change-Number: 22645
Gerrit-PatchSet: 1
Gerrit-Owner: Marshall Dawson <marshalldawson3rd@gmail.com>