[coreboot-gerrit] Change in coreboot[master]: amd/stoneyridge: Add function to find PmControl register

Marshall Dawson (Code Review) gerrit at coreboot.org
Thu Oct 5 00:30:13 CEST 2017


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


Change subject: amd/stoneyridge: Add function to find PmControl register
......................................................................

amd/stoneyridge: Add function to find PmControl register

Find the PmControl register's I/O address by checking the hardware in
PMx62.  Don't rely on the address being the coreboot default.  PmControl
is the first register in the AcpiPm1CntBlk.

Change-Id: Ibb608dcaa7801af067d6edd86f92c117c2ac08a6
Signed-off-by: Marshall Dawson <marshalldawson3rd at gmail.com>
---
M src/soc/amd/stoneyridge/include/soc/southbridge.h
M src/soc/amd/stoneyridge/sb_util.c
2 files changed, 6 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/21882/1

diff --git a/src/soc/amd/stoneyridge/include/soc/southbridge.h b/src/soc/amd/stoneyridge/include/soc/southbridge.h
index ebfee24..d506af9 100644
--- a/src/soc/amd/stoneyridge/include/soc/southbridge.h
+++ b/src/soc/amd/stoneyridge/include/soc/southbridge.h
@@ -202,6 +202,7 @@
 u32 smi_read32(u8 reg);
 void smi_write16(u8 reg, u16 value);
 void smi_write32(u8 reg, u32 value);
+uint16_t pm_acpi_pm_cnt_blk(void);
 int s3_load_nvram_early(int size, u32 *old_dword, int nvram_pos);
 void s3_resume_init_data(void *FchParams);
 int s3_save_nvram_early(u32 dword, int size, int  nvram_pos);
diff --git a/src/soc/amd/stoneyridge/sb_util.c b/src/soc/amd/stoneyridge/sb_util.c
index 87bff70..bdb199a 100644
--- a/src/soc/amd/stoneyridge/sb_util.c
+++ b/src/soc/amd/stoneyridge/sb_util.c
@@ -64,3 +64,8 @@
 {
 	write16((void *)(APU_SMI_BASE + offset), value);
 }
+
+uint16_t pm_acpi_pm_cnt_blk(void)
+{
+	return pm_read16(PM1_CNT_BLK);
+}

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

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibb608dcaa7801af067d6edd86f92c117c2ac08a6
Gerrit-Change-Number: 21882
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/20171004/120e82a1/attachment-0001.html>


More information about the coreboot-gerrit mailing list