diff options
author | Jeremy Compostella <jeremy.compostella@intel.com> | 2022-06-30 16:31:14 -0700 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-07-04 14:09:13 +0000 |
commit | cb08c7937dd21bcc1b6847104beab77fb787ff07 (patch) | |
tree | 1fea54577ee460b4bd0350bd157aa5803f2a560f /src/soc | |
parent | 97074645b35f0a3ae229e140ad42df584736905f (diff) |
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 <jeremy.compostella@intel.com>
Change-Id: I4f48742b04edd50fbc0db342b563534e709d6fdd
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65583
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/intel/alderlake/fsp_params.c | 8 |
1 files 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: |