[coreboot-gerrit] Change in coreboot[master]: soc/amd/stoneyridge: Function to Enable ACPI MMIO

Garrett Kirkendall (Code Review) gerrit at coreboot.org
Wed Mar 7 23:56:09 CET 2018


Garrett Kirkendall has uploaded this change for review. ( https://review.coreboot.org/25025


Change subject: soc/amd/stoneyridge: Function to Enable ACPI MMIO
......................................................................

soc/amd/stoneyridge: Function to Enable ACPI MMIO

* Add definitions for needed registers in southbridge.h
* Add function to enable AMD FCH ACPI MMIO regions 0xfed80000 to
  0xfed81ffff.  Will be called by a later commit.

BUG=b:65442212
BRANCH=master
TEST=abuild, build Gardenia, build boot Grunt

Change-Id: If26efa6c6f5b562ba898e7d9da4827833310dc26
Signed-off-by: Garrett Kirkendall <garrett.kirkendall at amd.corp-partner.google.com>
---
M src/soc/amd/stoneyridge/include/soc/southbridge.h
M src/soc/amd/stoneyridge/southbridge.c
2 files changed, 15 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/25/25025/1

diff --git a/src/soc/amd/stoneyridge/include/soc/southbridge.h b/src/soc/amd/stoneyridge/include/soc/southbridge.h
index acdaa8a..88403e6 100644
--- a/src/soc/amd/stoneyridge/include/soc/southbridge.h
+++ b/src/soc/amd/stoneyridge/include/soc/southbridge.h
@@ -32,6 +32,8 @@
 #define  PSP_MAILBOX_BAR_EN		0x10
 
 /* Power management registers:  0xfed80300 or index/data at IO 0xcd6/cd7 */
+#define PM_ISA_CONTROL			0x04
+#define   MMIO_EN			BIT(1)
 #define PM_PCI_CTRL			0x08
 #define   FORCE_SLPSTATE_RETRY		BIT(25)
 #define   FORCE_STPCLK_RETRY		BIT(24)
@@ -349,6 +351,7 @@
 void southbridge_init(void *chip_info);
 void sb_lpc_port80(void);
 void sb_lpc_decode(void);
+void sb_acpi_mmio_decode(void);
 void sb_pci_port80(void);
 void sb_read_mode(u32 mode);
 void sb_set_spi100(u16 norm, u16 fast, u16 alt, u16 tpm);
diff --git a/src/soc/amd/stoneyridge/southbridge.c b/src/soc/amd/stoneyridge/southbridge.c
index 57bd3f0..c591c69 100644
--- a/src/soc/amd/stoneyridge/southbridge.c
+++ b/src/soc/amd/stoneyridge/southbridge.c
@@ -367,6 +367,18 @@
 	pci_write_config32(SOC_LPC_DEV, LPC_IO_PORT_DECODE_ENABLE, tmp);
 }
 
+void sb_acpi_mmio_decode(void)
+{
+	uint8_t byte;
+
+	/* Enable ACPI MMIO range 0xfed80000 - 0xfed81fff */
+	outb(PM_ISA_CONTROL, PM_INDEX);
+	byte = inb(PM_DATA);
+	byte |= MMIO_EN;
+	outb(PM_ISA_CONTROL, PM_INDEX);
+	outb(byte, PM_DATA);
+}
+
 void sb_clk_output_48Mhz(void)
 {
 	u32 ctrl;

-- 
To view, visit https://review.coreboot.org/25025
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If26efa6c6f5b562ba898e7d9da4827833310dc26
Gerrit-Change-Number: 25025
Gerrit-PatchSet: 1
Gerrit-Owner: Garrett Kirkendall <garrett.kirkendall at amd.corp-partner.google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180307/094a12cc/attachment-0001.html>


More information about the coreboot-gerrit mailing list