summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/vendorcode/amd/opensil/genoa_poc/mpio/chip.c14
-rw-r--r--src/vendorcode/amd/opensil/genoa_poc/opensil.h2
-rw-r--r--src/vendorcode/amd/opensil/genoa_poc/ramstage.c1
3 files changed, 10 insertions, 7 deletions
diff --git a/src/vendorcode/amd/opensil/genoa_poc/mpio/chip.c b/src/vendorcode/amd/opensil/genoa_poc/mpio/chip.c
index 49a8934d8a..28e529dc3e 100644
--- a/src/vendorcode/amd/opensil/genoa_poc/mpio/chip.c
+++ b/src/vendorcode/amd/opensil/genoa_poc/mpio/chip.c
@@ -7,6 +7,11 @@
#include <device/device.h>
#include <device/pci_def.h>
#include "chip.h"
+#include "../opensil.h"
+
+struct chip_operations vendorcode_amd_opensil_genoa_poc_mpio_ops = {
+ CHIP_NAME("AMD GENOA MPIO")
+};
static void nbio_config(void)
{
@@ -175,7 +180,7 @@ static void per_device_config(MPIOCLASS_INPUT_BLK *mpio_data, struct device *dev
mpio_port++;
}
-static void configure_mpio(void *const config)
+void configure_mpio(void)
{
MPIOCLASS_INPUT_BLK *mpio_data = SilFindStructure(SilId_MpioClass, 0);
mpio_global_config(mpio_data);
@@ -183,11 +188,6 @@ static void configure_mpio(void *const config)
/* Find all devices with this chip */
for (struct device *dev = &dev_root; dev; dev = dev->next)
- if (dev->chip_ops->init == configure_mpio)
+ if (dev->chip_ops == &vendorcode_amd_opensil_genoa_poc_mpio_ops)
per_device_config(mpio_data, dev->bus->dev, dev->chip_info);
}
-
-struct chip_operations vendorcode_amd_opensil_genoa_poc_mpio_ops = {
- CHIP_NAME("AMD GENOA MPIO")
- .init = configure_mpio,
-};
diff --git a/src/vendorcode/amd/opensil/genoa_poc/opensil.h b/src/vendorcode/amd/opensil/genoa_poc/opensil.h
index b9caf73279..fbf46b3b8c 100644
--- a/src/vendorcode/amd/opensil/genoa_poc/opensil.h
+++ b/src/vendorcode/amd/opensil/genoa_poc/opensil.h
@@ -11,4 +11,6 @@ int add_opensil_memmap(struct device *dev, int idx);
// Fill in FADT from openSIL
void opensil_fill_fadt_io_ports(acpi_fadt_t *fadt);
+void configure_mpio(void);
+
#endif
diff --git a/src/vendorcode/amd/opensil/genoa_poc/ramstage.c b/src/vendorcode/amd/opensil/genoa_poc/ramstage.c
index 7c0bc5b355..7d03b32aec 100644
--- a/src/vendorcode/amd/opensil/genoa_poc/ramstage.c
+++ b/src/vendorcode/amd/opensil/genoa_poc/ramstage.c
@@ -126,6 +126,7 @@ static void setup_opensil(void *unused)
setup_rc_manager_default();
configure_usb();
configure_sata();
+ configure_mpio();
}
BOOT_STATE_INIT_ENTRY(BS_DEV_INIT_CHIPS, BS_ON_ENTRY, setup_opensil, NULL);