From 9849488da1da669936a94f41db9b010eccca74a0 Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Fri, 29 Jan 2021 11:35:16 +0100 Subject: soc/intel: Replace `SA_PCIEX_LENGTH` Kconfig options Use the existing `MMCONF_BUS_NUMBER` and `MMCONF_LENGTH` symbols. Change-Id: I88dcc0d5845198f668c6604c45fd869617168231 Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/50113 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans --- src/soc/intel/common/block/acpi/acpi.c | 2 +- src/soc/intel/common/block/systemagent/Kconfig | 19 ++----------------- .../common/block/systemagent/systemagent_early.c | 11 ++++++----- 3 files changed, 9 insertions(+), 23 deletions(-) (limited to 'src/soc/intel/common/block') diff --git a/src/soc/intel/common/block/acpi/acpi.c b/src/soc/intel/common/block/acpi/acpi.c index 656b696a82..f96a2d7853 100644 --- a/src/soc/intel/common/block/acpi/acpi.c +++ b/src/soc/intel/common/block/acpi/acpi.c @@ -29,7 +29,7 @@ __attribute__((weak)) unsigned long acpi_fill_mcfg(unsigned long current) /* PCI Segment Group 0, Start Bus Number 0, End Bus Number is 255 */ current += acpi_create_mcfg_mmconfig((void *)current, CONFIG_MMCONF_BASE_ADDRESS, 0, 0, - (CONFIG_SA_PCIEX_LENGTH >> 20) - 1); + CONFIG_MMCONF_BUS_NUMBER - 1); return current; } diff --git a/src/soc/intel/common/block/systemagent/Kconfig b/src/soc/intel/common/block/systemagent/Kconfig index c8aecabaad..315c0f55fe 100644 --- a/src/soc/intel/common/block/systemagent/Kconfig +++ b/src/soc/intel/common/block/systemagent/Kconfig @@ -8,23 +8,8 @@ if SOC_INTEL_COMMON_BLOCK_SA config MMCONF_BASE_ADDRESS default 0xe0000000 -config SA_PCIEX_LENGTH - hex - default 0x10000000 if (PCIEX_LENGTH_256MB) - default 0x8000000 if (PCIEX_LENGTH_128MB) - default 0x4000000 if (PCIEX_LENGTH_64MB) - default 0x10000000 - help - This option allows you to select length of PCIEX region. - -config PCIEX_LENGTH_256MB - bool - -config PCIEX_LENGTH_128MB - bool - -config PCIEX_LENGTH_64MB - bool +config MMCONF_BUS_NUMBER + default 256 config SA_ENABLE_IMR bool diff --git a/src/soc/intel/common/block/systemagent/systemagent_early.c b/src/soc/intel/common/block/systemagent/systemagent_early.c index ca11ee612a..6808117598 100644 --- a/src/soc/intel/common/block/systemagent/systemagent_early.c +++ b/src/soc/intel/common/block/systemagent/systemagent_early.c @@ -2,6 +2,7 @@ #define __SIMPLE_DEVICE__ +#include #include #include #include @@ -28,18 +29,18 @@ void bootblock_systemagent_early_init(void) pci_io_write_config32(SA_DEV_ROOT, PCIEXBAR + 4, reg); /* Get PCI Express Region Length */ - switch (CONFIG_SA_PCIEX_LENGTH) { - case 256 * MiB: + switch (CONFIG_MMCONF_BUS_NUMBER) { + case 256: pciexbar_length = PCIEXBAR_LENGTH_256MB; break; - case 128 * MiB: + case 128: pciexbar_length = PCIEXBAR_LENGTH_128MB; break; - case 64 * MiB: + case 64: pciexbar_length = PCIEXBAR_LENGTH_64MB; break; default: - pciexbar_length = PCIEXBAR_LENGTH_256MB; + dead_code(); } reg = CONFIG_MMCONF_BASE_ADDRESS | (pciexbar_length << 1) | PCIEXBAR_PCIEXBAREN; -- cgit v1.2.3