diff options
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/siemens/mc_ehl/mainboard.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/mainboard/siemens/mc_ehl/mainboard.c b/src/mainboard/siemens/mc_ehl/mainboard.c index 4cc5490f2a..d3475678bc 100644 --- a/src/mainboard/siemens/mc_ehl/mainboard.c +++ b/src/mainboard/siemens/mc_ehl/mainboard.c @@ -4,6 +4,9 @@ #include <bootstate.h> #include <console/console.h> #include <device/device.h> +#include <device/pci_def.h> +#include <device/pci_ops.h> +#include <device/pci_ids.h> #include <hwilib.h> #include <i210.h> #include <soc/gpio.h> @@ -120,8 +123,25 @@ static void mainboard_init(void *chip_info) gpio_configure_pads(pads, num); } +static void mainboard_final(void *chip_info) +{ + struct device *dev; + + if (CONFIG(PCI_ALLOW_BUS_MASTER_ANY_DEVICE)) { + /* Set Master Enable for on-board PCI devices if allowed. */ + dev = dev_find_device(PCI_VENDOR_ID_SIEMENS, 0x403e, 0); + if (dev) + pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER); + + dev = dev_find_device(PCI_VENDOR_ID_SIEMENS, 0x403f, 0); + if (dev) + pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER); + } +} + struct chip_operations mainboard_ops = { - .init = mainboard_init, + .init = mainboard_init, + .final = mainboard_final }; BOOT_STATE_INIT_ENTRY(BS_DEV_ENUMERATE, BS_ON_ENTRY, wait_for_legacy_dev, NULL); |