summaryrefslogtreecommitdiff
path: root/src/mainboard/ocp
diff options
context:
space:
mode:
authorMaxim Polyakov <max.senia.poliak@gmail.com>2021-01-14 01:37:26 +0300
committerPatrick Georgi <pgeorgi@google.com>2021-01-19 09:03:00 +0000
commit91a4512adfe37438b193c3c982e06ec21f75edc4 (patch)
tree6dc8826397fcde39d4a72131cc30094cdb4b5876 /src/mainboard/ocp
parent0c094aeb0e214b2abcef9a15ab23b1669a20d80e (diff)
downloadcoreboot-91a4512adfe37438b193c3c982e06ec21f75edc4.tar.xz
intel/xeon_sp, mb/ocp/deltalake: Rework get_stack_busnos()
- Return the busno based on the stack number. - Replace pci_mmio_read_config32 with pci_io_read_config32 to get the register value before mapping the MMIOCFG space. - Remove the plural `s` as the function now provides one bus number. Change-Id: I6e78e31b8ab89b1bdcfdeffae2e193e698385186 Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/49457 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lance Zhao Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/mainboard/ocp')
-rw-r--r--src/mainboard/ocp/deltalake/ramstage.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mainboard/ocp/deltalake/ramstage.c b/src/mainboard/ocp/deltalake/ramstage.c
index afc2b69cd4..74980635be 100644
--- a/src/mainboard/ocp/deltalake/ramstage.c
+++ b/src/mainboard/ocp/deltalake/ramstage.c
@@ -213,7 +213,7 @@ static int create_smbios_type9(int *handle, unsigned long *current)
uint8_t characteristics_1 = 0;
uint8_t characteristics_2 = 0;
uint32_t vendor_device_id;
- uint32_t stack_busnos[6];
+ uint8_t stack_busnos[MAX_IIO_STACK];
pci_devfn_t pci_dev;
unsigned int cap;
uint16_t sltcap;
@@ -221,7 +221,8 @@ static int create_smbios_type9(int *handle, unsigned long *current)
if (ipmi_get_pcie_config(&pcie_config) != CB_SUCCESS)
printk(BIOS_ERR, "Failed to get IPMI PCIe config\n");
- get_stack_busnos(stack_busnos);
+ for (index = 0; index < ARRAY_SIZE(stack_busnos); index++)
+ stack_busnos[index] = get_stack_busno(index);
for (index = 0; index < ARRAY_SIZE(slotinfo); index++) {
if (pcie_config == PCIE_CONFIG_A) {