diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2019-07-12 13:10:19 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2019-07-18 15:23:13 +0000 |
commit | 28dc7dce83131cdd54cad5b338af2f4b89d8969b (patch) | |
tree | fefc93f097b84a6afd55b6d33e78a98045b6e936 /src/soc/intel/icelake/acpi.c | |
parent | 4323d262473a1ea09eb3f843c4e856eb5851146f (diff) | |
download | coreboot-28dc7dce83131cdd54cad5b338af2f4b89d8969b.tar.xz |
soc/intel: Use config_of_path(SA_DEVFN_ROOT)
We do not want to disguise somewhat complex function
calls as simple macros.
Change-Id: I53324603c9ece1334c6e09d51338084166f7a585
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/34299
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: David Guckian
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/icelake/acpi.c')
-rw-r--r-- | src/soc/intel/icelake/acpi.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/soc/intel/icelake/acpi.c b/src/soc/intel/icelake/acpi.c index ae7b344df0..c61d877d1c 100644 --- a/src/soc/intel/icelake/acpi.c +++ b/src/soc/intel/icelake/acpi.c @@ -137,8 +137,9 @@ acpi_cstate_t *soc_get_cstate_map(size_t *entries) ARRAY_SIZE(cstate_set_non_s0ix))]; int *set; int i; - struct device *dev = SA_DEV_ROOT; - config_t *config = dev->chip_info; + + config_t *config = config_of_path(SA_DEVFN_ROOT); + int is_s0ix_enable = config->s0ix_enable; if (is_s0ix_enable) { @@ -158,8 +159,8 @@ acpi_cstate_t *soc_get_cstate_map(size_t *entries) void soc_power_states_generation(int core_id, int cores_per_package) { - struct device *dev = SA_DEV_ROOT; - config_t *config = dev->chip_info; + config_t *config = config_of_path(SA_DEVFN_ROOT); + if (config->eist_enable) /* Generate P-state tables */ generate_p_state_entries(core_id, cores_per_package); @@ -168,8 +169,8 @@ void soc_power_states_generation(int core_id, int cores_per_package) void soc_fill_fadt(acpi_fadt_t *fadt) { const uint16_t pmbase = ACPI_BASE_ADDRESS; - const struct device *dev = pcidev_on_root(0, 0); - const struct soc_intel_icelake_config *config = dev->chip_info; + + config_t *config = config_of_path(SA_DEVFN_ROOT); if (!config->PmTimerDisabled) { fadt->pm_tmr_blk = pmbase + PM1_TMR; @@ -193,8 +194,7 @@ uint32_t soc_read_sci_irq_select(void) void acpi_create_gnvs(struct global_nvs_t *gnvs) { - const struct device *dev = pcidev_on_root(0, 0); - const struct soc_intel_icelake_config *config = dev->chip_info; + config_t *config = config_of_path(SA_DEVFN_ROOT); /* Set unknown wake source */ gnvs->pm1i = -1; |