[coreboot-gerrit] Change in ...coreboot[master]: soc/amd/stoneyridge: Name IO061 in ASL appropriately

Patrick Georgi (Code Review) gerrit at coreboot.org
Wed Dec 5 15:06:36 CET 2018


Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/30037 )

Change subject: soc/amd/stoneyridge: Name IO061 in ASL appropriately
......................................................................

soc/amd/stoneyridge: Name IO061 in ASL appropriately

AMD traditionally claims the resource at I/O port 61 for the onboard
PC-AT speaker.  In later designs, the speaker may be omitted in favor
of routing the SPKR signal to the codec.

Some systems implement neither, and for those it is not correct to
identify the resource as a speaker.  Modify the EISAID reported to
the OS depending on the system design.  The default is that port 61
is reported as reserved.  In order to report a speaker, add #define
in mainboard//dsdt.asl.

TEST=check /proc/ioports and iasl -d for both ways using a Grunt
BUG=b:117818432

Change-Id: I33aafb187f9fea7b38aae43c399292c7521fcfc4
Signed-off-by: Marshall Dawson <marshalldawson3rd at gmail.com>
Reviewed-on: https://review.coreboot.org/c/30037
Tested-by: build bot (Jenkins) <no-reply at coreboot.org>
Reviewed-by: Martin Roth <martinroth at google.com>
---
M src/mainboard/amd/gardenia/dsdt.asl
M src/soc/amd/stoneyridge/acpi/lpc.asl
2 files changed, 9 insertions(+), 1 deletion(-)

Approvals:
  build bot (Jenkins): Verified
  Martin Roth: Looks good to me, approved



diff --git a/src/mainboard/amd/gardenia/dsdt.asl b/src/mainboard/amd/gardenia/dsdt.asl
index f190b4e..52bd90b 100644
--- a/src/mainboard/amd/gardenia/dsdt.asl
+++ b/src/mainboard/amd/gardenia/dsdt.asl
@@ -13,6 +13,8 @@
  * GNU General Public License for more details.
  */
 
+#define MAINBOARD_HAS_SPEAKER 1
+
 /* DefinitionBlock Statement */
 #include <arch/acpi.h>
 DefinitionBlock (
diff --git a/src/soc/amd/stoneyridge/acpi/lpc.asl b/src/soc/amd/stoneyridge/acpi/lpc.asl
index a41357a..e24514c 100644
--- a/src/soc/amd/stoneyridge/acpi/lpc.asl
+++ b/src/soc/amd/stoneyridge/acpi/lpc.asl
@@ -13,6 +13,12 @@
  * GNU General Public License for more details.
  */
 
+#if IS_ENABLED(MAINBOARD_HAS_SPEAKER)
+#define IO61_HID "PNP0800" /* AT style speaker */
+#else
+#define IO61_HID "PNP0C02" /* reserved resource */
+#endif
+
 /* 0:14.3 - LPC */
 Device(LPCB) {
 	Name(_ADR, 0x00140003)
@@ -66,7 +72,7 @@
 	} /* End Device(_SB.PCI0.LpcIsaBr.TMR) */
 
 	Device(SPKR) {	/* Speaker */
-		Name(_HID,EISAID("PNP0800"))	/* AT style speaker */
+		Name(_HID,EISAID(IO61_HID))
 		Name(_CRS, ResourceTemplate() {
 			IO(Decode16, 0x0061, 0x0061, 0, 1)
 		})

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

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I33aafb187f9fea7b38aae43c399292c7521fcfc4
Gerrit-Change-Number: 30037
Gerrit-PatchSet: 3
Gerrit-Owner: Marshall Dawson <marshalldawson3rd at gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth at google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi at google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply at coreboot.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181205/c05c733c/attachment.html>


More information about the coreboot-gerrit mailing list