Angel Pons | c3c7ef3 | 2020-07-12 19:08:57 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <acpi/acpi.h> |
Angel Pons | c3c7ef3 | 2020-07-12 19:08:57 +0200 | [diff] [blame] | 4 | #include <soc/iomap.h> |
| 5 | #include <soc/pm.h> |
| 6 | #include "chip.h" |
| 7 | |
Michael Niewöhner | f6611a2 | 2020-08-03 16:53:41 +0200 | [diff] [blame] | 8 | void soc_fill_fadt(acpi_fadt_t *fadt) |
Angel Pons | c3c7ef3 | 2020-07-12 19:08:57 +0200 | [diff] [blame] | 9 | { |
| 10 | const uint16_t pmbase = ACPI_BASE_ADDRESS; |
| 11 | config_t *config = config_of_soc(); |
| 12 | |
Angel Pons | c3c7ef3 | 2020-07-12 19:08:57 +0200 | [diff] [blame] | 13 | fadt->pm2_cnt_blk = pmbase + PM2_CNT; |
| 14 | fadt->pm_tmr_blk = pmbase + PM1_TMR; |
Angel Pons | c3c7ef3 | 2020-07-12 19:08:57 +0200 | [diff] [blame] | 15 | |
Angel Pons | c3c7ef3 | 2020-07-12 19:08:57 +0200 | [diff] [blame] | 16 | fadt->pm2_cnt_len = 1; |
| 17 | fadt->pm_tmr_len = 4; |
Michael Niewöhner | f6611a2 | 2020-08-03 16:53:41 +0200 | [diff] [blame] | 18 | |
Kyösti Mälkki | 88decca | 2023-04-28 07:04:34 +0300 | [diff] [blame] | 19 | fill_fadt_extended_pm_io(fadt); |
| 20 | |
Angel Pons | c3c7ef3 | 2020-07-12 19:08:57 +0200 | [diff] [blame] | 21 | fadt->iapc_boot_arch = ACPI_FADT_LEGACY_FREE; |
| 22 | if (!CONFIG(NO_FADT_8042)) |
| 23 | fadt->iapc_boot_arch |= ACPI_FADT_8042; |
| 24 | |
Angel Pons | c3c7ef3 | 2020-07-12 19:08:57 +0200 | [diff] [blame] | 25 | if (config->s0ix_enable) |
| 26 | fadt->flags |= ACPI_FADT_LOW_PWR_IDLE_S0; |
| 27 | |
Angel Pons | c3c7ef3 | 2020-07-12 19:08:57 +0200 | [diff] [blame] | 28 | |
Angel Pons | c3c7ef3 | 2020-07-12 19:08:57 +0200 | [diff] [blame] | 29 | } |