diff options
author | Sridhar Siricilla <sridhar.siricilla@intel.com> | 2022-09-26 12:12:20 +0530 |
---|---|---|
committer | Martin Roth <martin.roth@amd.corp-partner.google.com> | 2022-10-06 18:18:31 +0000 |
commit | cb4d46463345449f353707f6701626cd57990587 (patch) | |
tree | fd054d6800f0b7fc3ea9e9307d16486e5b0476d3 /src/soc/intel/meteorlake/fsp_params.c | |
parent | a0f3b86e1336be209a43cbd08f9a95e0ebb5e201 (diff) |
soc/intel/meteorlake: Make use of is_devfn_enabled() function
The patch uses is_devfn_enabled() function to enable the TBT PCIe ports
through FSP-M and FSP-S UPDs. Also, removes unused tbt_pcie_port_disable
array member from soc_intel_meteorlake_config struct.
TEST=Build coreboot for Google/Rex
Signed-off-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
Change-Id: Ie55e196bd8f682864b8f74dbe253f345d7184753
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67831
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Diffstat (limited to 'src/soc/intel/meteorlake/fsp_params.c')
-rw-r--r-- | src/soc/intel/meteorlake/fsp_params.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/soc/intel/meteorlake/fsp_params.c b/src/soc/intel/meteorlake/fsp_params.c index e3c85600a1..c727fb31aa 100644 --- a/src/soc/intel/meteorlake/fsp_params.c +++ b/src/soc/intel/meteorlake/fsp_params.c @@ -337,11 +337,8 @@ static void fill_fsps_vmd_params(FSP_S_CONFIG *s_cfg, static void fill_fsps_tbt_params(FSP_S_CONFIG *s_cfg, const struct soc_intel_meteorlake_config *config) { - int max_port = get_max_tbt_pcie_port(); - - memset(s_cfg->ITbtPcieRootPortEn, 0, sizeof(s_cfg->ITbtPcieRootPortEn)); - for (int i = 0; i < max_port; i++) - s_cfg->ITbtPcieRootPortEn[i] = !(config->tbt_pcie_port_disable[i]); + for (int i = 0; i < ARRAY_SIZE(s_cfg->ITbtPcieRootPortEn); i++) + s_cfg->ITbtPcieRootPortEn[i] = is_devfn_enabled(PCI_DEVFN_TBT(i)); } static void fill_fsps_8254_params(FSP_S_CONFIG *s_cfg, |