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>
This commit is contained in:
Kyösti Mälkki
2019-07-12 13:10:19 +03:00
parent 4323d26247
commit 28dc7dce83
34 changed files with 102 additions and 215 deletions

View File

@@ -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;