aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/common/block/systemagent/systemagent_early.c
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2021-01-29 11:35:16 +0100
committerAngel Pons <th3fanbus@gmail.com>2021-01-30 23:14:08 +0000
commit9849488da1da669936a94f41db9b010eccca74a0 (patch)
tree81f870282113400fecdeb14c0c8e84659a58ec4e /src/soc/intel/common/block/systemagent/systemagent_early.c
parent90be7544e4089e3f140298620e23926a8c791760 (diff)
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 <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/50113 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/soc/intel/common/block/systemagent/systemagent_early.c')
-rw-r--r--src/soc/intel/common/block/systemagent/systemagent_early.c11
1 files changed, 6 insertions, 5 deletions
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 <assert.h>
#include <device/mmio.h>
#include <device/pci_ops.h>
#include <device/device.h>
@@ -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;