From cb08c7937dd21bcc1b6847104beab77fb787ff07 Mon Sep 17 00:00:00 2001 From: Jeremy Compostella Date: Thu, 30 Jun 2022 16:31:14 -0700 Subject: soc/intel/alderlake: remove unnecessary test condition mch_id is set to zero and then unnecessarily tested. TEST=build and boot image on ADL RVP board Signed-off-by: Jeremy Compostella Change-Id: I4f48742b04edd50fbc0db342b563534e709d6fdd Reviewed-on: https://review.coreboot.org/c/coreboot/+/65583 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak --- src/soc/intel/alderlake/fsp_params.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/soc/intel/alderlake/fsp_params.c b/src/soc/intel/alderlake/fsp_params.c index 4050254191..37a3cb7535 100644 --- a/src/soc/intel/alderlake/fsp_params.c +++ b/src/soc/intel/alderlake/fsp_params.c @@ -493,14 +493,10 @@ static unsigned int get_aspm_control(enum ASPM_control ctl) /* This function returns the VccIn Aux Imon IccMax values for ADL-P and ADL-S SKU's */ static uint16_t get_vccin_aux_imon_iccmax(void) { - uint16_t mch_id = 0; + struct device *dev = pcidev_path_on_root(SA_DEVFN_ROOT); + uint16_t mch_id = dev ? pci_read_config16(dev, PCI_DEVICE_ID) : 0xffff; uint8_t tdp; - if (!mch_id) { - struct device *dev = pcidev_path_on_root(SA_DEVFN_ROOT); - mch_id = dev ? pci_read_config16(dev, PCI_DEVICE_ID) : 0xffff; - } - switch (mch_id) { case PCI_DID_INTEL_ADL_P_ID_1: case PCI_DID_INTEL_ADL_P_ID_3: -- cgit v1.2.3