soc/amd/picasso,stoneyridge/acpi: use define for RTC_DATE_ALARM

Cezanne already uses a define for this and it's better to define and use
constants instead of magic values.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ifa4b3b3cdb161670128b284a3396fc5a85545608
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59586
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
This commit is contained in:
Felix Held 2021-11-18 20:41:40 +01:00
parent 7f61d41c1b
commit 72b92c9207
4 changed files with 8 additions and 2 deletions

View File

@ -92,7 +92,7 @@ void acpi_fill_fadt(acpi_fadt_t *fadt)
fadt->p_lvl3_lat = ACPI_FADT_C3_NOT_SUPPORTED; fadt->p_lvl3_lat = ACPI_FADT_C3_NOT_SUPPORTED;
fadt->duty_offset = 1; /* CLK_VAL bits 3:1 */ fadt->duty_offset = 1; /* CLK_VAL bits 3:1 */
fadt->duty_width = 3; /* CLK_VAL bits 3:1 */ fadt->duty_width = 3; /* CLK_VAL bits 3:1 */
fadt->day_alrm = 0x0d; fadt->day_alrm = RTC_DATE_ALARM;
fadt->mon_alrm = 0; fadt->mon_alrm = 0;
fadt->iapc_boot_arch = cfg->fadt_boot_arch; /* legacy free default */ fadt->iapc_boot_arch = cfg->fadt_boot_arch; /* legacy free default */
fadt->res2 = 0; /* reserved, MUST be 0 ACPI 3.0 */ fadt->res2 = 0; /* reserved, MUST be 0 ACPI 3.0 */

View File

@ -8,6 +8,9 @@
#include <device/device.h> #include <device/device.h>
#include <stdint.h> #include <stdint.h>
/* RTC Registers */
#define RTC_DATE_ALARM 0x0d
uintptr_t agesa_write_acpi_tables(const struct device *device, uintptr_t current, uintptr_t agesa_write_acpi_tables(const struct device *device, uintptr_t current,
acpi_rsdp_t *rsdp); acpi_rsdp_t *rsdp);

View File

@ -84,7 +84,7 @@ void acpi_fill_fadt(acpi_fadt_t *fadt)
fadt->p_lvl3_lat = ACPI_FADT_C3_NOT_SUPPORTED; fadt->p_lvl3_lat = ACPI_FADT_C3_NOT_SUPPORTED;
fadt->duty_offset = 1; /* CLK_VAL bits 3:1 */ fadt->duty_offset = 1; /* CLK_VAL bits 3:1 */
fadt->duty_width = 3; /* CLK_VAL bits 3:1 */ fadt->duty_width = 3; /* CLK_VAL bits 3:1 */
fadt->day_alrm = 0x0d; fadt->day_alrm = RTC_DATE_ALARM;
fadt->mon_alrm = 0; /* Not supported */ fadt->mon_alrm = 0; /* Not supported */
fadt->iapc_boot_arch = FADT_BOOT_ARCH; /* See table 5-10 */ fadt->iapc_boot_arch = FADT_BOOT_ARCH; /* See table 5-10 */
fadt->res2 = 0; /* reserved, MUST be 0 ACPI 3.0 */ fadt->res2 = 0; /* reserved, MUST be 0 ACPI 3.0 */

View File

@ -12,6 +12,9 @@
#define FADT_BOOT_ARCH (ACPI_FADT_LEGACY_DEVICES | ACPI_FADT_8042) #define FADT_BOOT_ARCH (ACPI_FADT_LEGACY_DEVICES | ACPI_FADT_8042)
#endif #endif
/* RTC Registers */
#define RTC_DATE_ALARM 0x0d
const char *soc_acpi_name(const struct device *dev); const char *soc_acpi_name(const struct device *dev);
#endif /* AMD_STONEYRIDGE_ACPI_H */ #endif /* AMD_STONEYRIDGE_ACPI_H */