summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorAnand K Mistry <amistry@google.com>2021-05-27 14:32:29 +1000
committerPatrick Georgi <pgeorgi@google.com>2021-06-11 07:37:43 +0000
commitdd8e819e6b848b4a03bdf8dafd1dc3e2ebd8f18c (patch)
treed61efc3c78f17b45e8ff66c55fbad241d9d405e7 /src/soc
parentc7d12f1165d29f249411c5f9c7d21b6e5e56f262 (diff)
soc/amd/stoneyridge: Set missing RTC offsets for day alarm and century
On Linux, in order to set wake alarms >24 hours, the RTC Date Alarm field must be set to a valid non-zero value. If not, there are two consequences: 1. Alarms >24 hours don't work 2. The kernel will refuse to enter suspend because it can't resume as expected to service the alarm. Since the RTC Date Alarm and RTC AltCentury fields are supported on Stoneyridge, set them. This is a mirror of commit 041fcf5902 ("soc/amd/picasso/acpi: Set missing RTC offsets") for picasso. BUG=b:187516317 TEST=On a Chrome OS 'grunt' device, run `time powerd_dbus_suspend --suspend_for_sec=172800` and verify the system suspended and woke up after 48 hours BRANCH=grunt Signed-off-by: Anand K Mistry <amistry@google.com> Change-Id: I10831b982662e680fa71aa81d02935e1b7e7a7a1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/55001 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/amd/stoneyridge/acpi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/soc/amd/stoneyridge/acpi.c b/src/soc/amd/stoneyridge/acpi.c
index de79ec36be..e78b414afd 100644
--- a/src/soc/amd/stoneyridge/acpi.c
+++ b/src/soc/amd/stoneyridge/acpi.c
@@ -82,9 +82,9 @@ void acpi_fill_fadt(acpi_fadt_t *fadt)
fadt->p_lvl3_lat = ACPI_FADT_C3_NOT_SUPPORTED;
fadt->duty_offset = 1; /* CLK_VAL bits 3:1 */
fadt->duty_width = 3; /* CLK_VAL bits 3:1 */
- fadt->day_alrm = 0; /* 0x7d these have to be */
- fadt->mon_alrm = 0; /* 0x7e added to cmos.layout */
- fadt->century = 0; /* 0x7f to make rtc alarm work */
+ fadt->day_alrm = 0x0d;
+ fadt->mon_alrm = 0; /* Not supported */
+ fadt->century = 0x32;
fadt->iapc_boot_arch = FADT_BOOT_ARCH; /* See table 5-10 */
fadt->res2 = 0; /* reserved, MUST be 0 ACPI 3.0 */
fadt->flags |= ACPI_FADT_WBINVD | /* See table 5-10 ACPI 3.0a spec */