summaryrefslogtreecommitdiff
path: root/src/soc/intel/tigerlake/chip.c
diff options
context:
space:
mode:
authorMichael Niewöhner <foss@mniewoehner.de>2022-01-09 02:20:17 +0100
committerPaul Fagerburg <pfagerburg@chromium.org>2022-01-14 00:29:28 +0000
commit9f0285b6fe46d6ec76faad0c099239c227e5caa1 (patch)
treedd6b79bf9a2e8134342400d53dc91b36ee7753f6 /src/soc/intel/tigerlake/chip.c
parent7a2bc06b121a978b7517230f7b8de2b5cc94c7e7 (diff)
soc/intel/tgl: deduplicate the PCIe root port map
Make use of the helper introduced in the parent change to deduplicate the PCIe root port table. Change-Id: I2dae4e4caf0a7ba3662889f3b31da0c3c299bc92 Signed-off-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/60945 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/soc/intel/tigerlake/chip.c')
-rw-r--r--src/soc/intel/tigerlake/chip.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/soc/intel/tigerlake/chip.c b/src/soc/intel/tigerlake/chip.c
index 6994d94c52..459452455c 100644
--- a/src/soc/intel/tigerlake/chip.c
+++ b/src/soc/intel/tigerlake/chip.c
@@ -17,19 +17,6 @@
#include <soc/ramstage.h>
#include <soc/soc_chip.h>
-static const struct pcie_rp_group pch_lp_rp_groups[] = {
- { .slot = PCH_DEV_SLOT_PCIE, .count = 8 },
- { .slot = PCH_DEV_SLOT_PCIE_1, .count = 4 },
- { 0 }
-};
-
-static const struct pcie_rp_group pch_h_rp_groups[] = {
- { .slot = PCH_DEV_SLOT_PCIE, .count = 8 },
- { .slot = PCH_DEV_SLOT_PCIE_1, .count = 8 },
- { .slot = PCH_DEV_SLOT_PCIE_2, .count = 8 },
- { 0 }
-};
-
#if CONFIG(HAVE_ACPI_TABLES)
const char *soc_acpi_name(const struct device *dev)
{
@@ -170,10 +157,8 @@ void soc_init_pre_device(void *chip_info)
soc_fill_gpio_pm_configuration();
/* Swap enabled PCI ports in device tree if needed. */
- if (CONFIG(SOC_INTEL_TIGERLAKE_PCH_H))
- pcie_rp_update_devicetree(pch_h_rp_groups);
- else
- pcie_rp_update_devicetree(pch_lp_rp_groups);
+ const struct pcie_rp_group *pch_rp_groups = soc_get_pch_rp_groups();
+ pcie_rp_update_devicetree(pch_rp_groups);
}
static void cpu_fill_ssdt(const struct device *dev)