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/broadwell | |
parent | 4323d262473a1ea09eb3f843c4e856eb5851146f (diff) |
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/broadwell')
-rw-r--r-- | src/soc/intel/broadwell/acpi.c | 4 | ||||
-rw-r--r-- | src/soc/intel/broadwell/cpu.c | 7 | ||||
-rw-r--r-- | src/soc/intel/broadwell/smmrelocate.c | 2 |
3 files changed, 6 insertions, 7 deletions
diff --git a/src/soc/intel/broadwell/acpi.c b/src/soc/intel/broadwell/acpi.c index 25867c5677..705bc0089e 100644 --- a/src/soc/intel/broadwell/acpi.c +++ b/src/soc/intel/broadwell/acpi.c @@ -386,12 +386,12 @@ static void generate_T_state_entries(int core, int cores_per_package) static void generate_C_state_entries(void) { - struct device *dev = SA_DEV_ROOT; - config_t *config = dev->chip_info; acpi_cstate_t map[3]; int *set; int i; + config_t *config = config_of_path(SA_DEVFN_ROOT); + if (config->s0ix_enable) set = cstate_set_s0ix; else diff --git a/src/soc/intel/broadwell/cpu.c b/src/soc/intel/broadwell/cpu.c index 5592538ab3..af587ee542 100644 --- a/src/soc/intel/broadwell/cpu.c +++ b/src/soc/intel/broadwell/cpu.c @@ -195,8 +195,7 @@ static int pcode_mailbox_write(u32 command, u32 data) static void initialize_vr_config(void) { - struct device *dev = SA_DEV_ROOT; - config_t *conf = dev->chip_info; + config_t *conf = config_of_path(SA_DEVFN_ROOT); msr_t msr; printk(BIOS_DEBUG, "Initializing VR config.\n"); @@ -450,10 +449,10 @@ static void configure_c_states(void) static void configure_thermal_target(void) { - struct device *dev = SA_DEV_ROOT; - config_t *conf = dev->chip_info; + config_t *conf = config_of_path(SA_DEVFN_ROOT); msr_t msr; + /* Set TCC activation offset if supported */ msr = rdmsr(MSR_PLATFORM_INFO); if ((msr.lo & (1 << 30)) && conf->tcc_offset) { diff --git a/src/soc/intel/broadwell/smmrelocate.c b/src/soc/intel/broadwell/smmrelocate.c index 5dd076f14a..98c3c4cddd 100644 --- a/src/soc/intel/broadwell/smmrelocate.c +++ b/src/soc/intel/broadwell/smmrelocate.c @@ -270,7 +270,7 @@ static void setup_ied_area(struct smm_relocation_params *params) void smm_info(uintptr_t *perm_smbase, size_t *perm_smsize, size_t *smm_save_state_size) { - struct device *dev = SA_DEV_ROOT; + struct device *dev = pcidev_path_on_root(SA_DEVFN_ROOT); printk(BIOS_DEBUG, "Setting up SMI for CPU\n"); |