summaryrefslogtreecommitdiffstats
path: root/src/soc/amd/stoneyridge
diff options
context:
space:
mode:
authorMatt DeVillier <matt.devillier@amd.corp-partner.google.com>2023-08-08 11:37:03 -0500
committerFelix Held <felix-coreboot@felixheld.de>2023-08-09 19:08:57 +0000
commit7cf9c7451808421300a00279abb4d48c42e5050a (patch)
treeb72b9119ac2fc312d27f65f50af4dbd71eacf79c /src/soc/amd/stoneyridge
parentdcce5a33e95b1fa3c09a0ab0a9e951336cbf096e (diff)
downloadcoreboot-7cf9c7451808421300a00279abb4d48c42e5050a.tar.gz
coreboot-7cf9c7451808421300a00279abb4d48c42e5050a.tar.bz2
coreboot-7cf9c7451808421300a00279abb4d48c42e5050a.zip
soc/amd/*: Fix UART ACPI device status
Prior to commit d1c0f958d198 ("acpi: Call acpi_fill_ssdt() only for enabled devices"), uart_inject_ssdt() was used to set the ACPI status (_STA) for both enabled and disabled devices. The aforementioned commit limited it to being called only on enabled devices, which left disabled devices without any _STA method at all -- which the OS assumes means that the device is present and enabled. To fix this, create the _STA method in the UART asl code for each port, and set the return value to a name variable (STAT) which defaults to 0 (not present/disabled). Then, have uart_inject_ssdt() set STAT to present and enabled (0xF) for UARTs actually present on the board. TEST=build/boot google/skyrim (frostflow), dump ACPI tables, and verify that _STA returns 0xF only for UARTs enabled in devicetree. Change-Id: Id89e74c3ea7f53280935898ee35311b7cf3b152a Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77092 Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/stoneyridge')
-rw-r--r--src/soc/amd/stoneyridge/acpi/mmio.asl10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/soc/amd/stoneyridge/acpi/mmio.asl b/src/soc/amd/stoneyridge/acpi/mmio.asl
index b6f4fc37a348..362b9f5dbc20 100644
--- a/src/soc/amd/stoneyridge/acpi/mmio.asl
+++ b/src/soc/amd/stoneyridge/acpi/mmio.asl
@@ -47,6 +47,11 @@ Device (FUR0)
IRQ (Edge, ActiveHigh, Exclusive) { 10 }
Memory32Fixed (ReadWrite, APU_UART0_BASE, 0x2000)
})
+ Name (STAT, 0x0)
+ Method (_STA, 0x0, NotSerialized)
+ {
+ Return (STAT)
+ }
}
Device (FUR1) {
@@ -57,6 +62,11 @@ Device (FUR1) {
IRQ (Edge, ActiveHigh, Exclusive) { 11 }
Memory32Fixed (ReadWrite, APU_UART1_BASE, 0x2000)
})
+ Name (STAT, 0x0)
+ Method (_STA, 0x0, NotSerialized)
+ {
+ Return (STAT)
+ }
}
Device (I2CA) {