From 37f0735d0c9f0865ba7b3ffe75cad0a8a5ff2d87 Mon Sep 17 00:00:00 2001 From: Felix Singer Date: Tue, 30 Apr 2024 17:03:35 +0200 Subject: soc/intel/xeon_sp: Clean up device enablement configuration Clean up by using is_devfn_enabled(). Change-Id: I9ea3d8b1b18e84a75a81a7e926d2c638766bb493 Signed-off-by: Felix Singer Reviewed-on: https://review.coreboot.org/c/coreboot/+/82120 Reviewed-by: Matt DeVillier Reviewed-by: Shuo Liu Tested-by: build bot (Jenkins) --- src/soc/intel/xeon_sp/cpx/romstage.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/soc/intel/xeon_sp/cpx/romstage.c b/src/soc/intel/xeon_sp/cpx/romstage.c index fe2ca8654a..b72417e06a 100644 --- a/src/soc/intel/xeon_sp/cpx/romstage.c +++ b/src/soc/intel/xeon_sp/cpx/romstage.c @@ -123,7 +123,6 @@ void save_dimm_info(void) void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd, uint32_t version) { FSP_M_CONFIG *m_cfg = &mupd->FspmConfig; - const struct device *dev; const config_t *config = config_of_soc(); /* ErrorLevel - 0 (disable) to 8 (verbose) */ @@ -175,8 +174,7 @@ void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd, uint32_t version) /* Enable PCH thermal device in FSP, the definition of ThermalDeviceEnable is 0: Disable, 1: Enabled in PCI mode, 2: Enabled in ACPI mode */ - dev = pcidev_path_on_root(PCH_DEVFN_THERMAL); - m_cfg->ThermalDeviceEnable = dev && dev->enabled; + m_cfg->ThermalDeviceEnable = is_devfn_enabled(PCH_DEVFN_THERMAL); /* Enable VT-d according to DTB */ m_cfg->VtdSupport = config->vtd_support; -- cgit v1.2.3