From 194f0eb59c246a4ea0919f13e068e58a0b5779dd Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Mon, 21 Jun 2021 19:27:55 +0530 Subject: [PATCH] soc/intel/elkhartlake: Use is_devfn_enabled() for Device4Enable UPD 1. Replace pcidev_path_on_root() and is_dev_enabled() functions combination with is_devfn_enabled() while enabling Thermal config. 2. Remove unused local variable of device structure type (struct device *). Change-Id: Icc2a44d6d3f1a78bf47354049dd9e2a0ed2282ba Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/55728 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh Reviewed-by: Lean Sheng Tan Reviewed-by: Angel Pons --- src/soc/intel/elkhartlake/fsp_params.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/soc/intel/elkhartlake/fsp_params.c b/src/soc/intel/elkhartlake/fsp_params.c index 97cd2847ace1..c7ac16ee600a 100644 --- a/src/soc/intel/elkhartlake/fsp_params.c +++ b/src/soc/intel/elkhartlake/fsp_params.c @@ -97,7 +97,7 @@ static void parse_devicetree(FSP_S_CONFIG *params) void platform_fsp_silicon_init_params_cb(FSPS_UPD *supd) { unsigned int i; - struct device *dev; + FSP_S_CONFIG *params = &supd->FspsConfig; struct soc_intel_elkhartlake_config *config = config_of_soc(); @@ -240,8 +240,7 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *supd) } /* Thermal config */ - dev = pcidev_path_on_root(SA_DEVFN_DPTF); - params->Device4Enable = is_dev_enabled(dev); + params->Device4Enable = is_devfn_enabled(SA_DEVFN_DPTF); params->ProcHotResponse = 0x0; //Disable PROCHOT response /* Thermal sensor (TS) target width */ params->DmiTS0TW = 3;