diff options
5 files changed, 21 insertions, 14 deletions
diff --git a/src/mainboard/siemens/mc_apl1/mainboard.c b/src/mainboard/siemens/mc_apl1/mainboard.c index bca0cbb4c8..114d6e32b8 100644 --- a/src/mainboard/siemens/mc_apl1/mainboard.c +++ b/src/mainboard/siemens/mc_apl1/mainboard.c @@ -215,10 +215,12 @@ static void mainboard_final(void *chip_info) /* Do board specific things */ variant_mainboard_final(); - /* Set Master Enable for on-board PCI device. */ - dev = dev_find_device(PCI_VENDOR_ID_SIEMENS, 0x403f, 0); - if (dev) { - pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER); + /* Set Master Enable for on-board PCI device if allowed. */ + if (CONFIG(PCI_ALLOW_BUS_MASTER)) { + dev = dev_find_device(PCI_VENDOR_ID_SIEMENS, 0x403f, 0); + if (dev) { + pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER); + } } /* Set up SPI OPCODE menu before the controller is locked. */ fast_spi_set_opcode_menu(); diff --git a/src/mainboard/siemens/mc_apl1/variants/mc_apl2/mainboard.c b/src/mainboard/siemens/mc_apl1/variants/mc_apl2/mainboard.c index 1baa8ec802..7d8b9f5181 100644 --- a/src/mainboard/siemens/mc_apl1/variants/mc_apl2/mainboard.c +++ b/src/mainboard/siemens/mc_apl1/variants/mc_apl2/mainboard.c @@ -10,9 +10,11 @@ void variant_mainboard_final(void) { struct device *dev; - /* Set Master Enable for on-board PCI device. */ - dev = dev_find_device(PCI_VENDOR_ID_SIEMENS, 0x403e, 0); - if (dev) { - pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER); + if (CONFIG(PCI_ALLOW_BUS_MASTER)) { + /* Set Master Enable for on-board PCI device if allowed. */ + dev = dev_find_device(PCI_VENDOR_ID_SIEMENS, 0x403e, 0); + if (dev) { + pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER); + } } } diff --git a/src/mainboard/siemens/mc_apl1/variants/mc_apl3/mainboard.c b/src/mainboard/siemens/mc_apl1/variants/mc_apl3/mainboard.c index 842f3778ae..4f43782cf4 100644 --- a/src/mainboard/siemens/mc_apl1/variants/mc_apl3/mainboard.c +++ b/src/mainboard/siemens/mc_apl1/variants/mc_apl3/mainboard.c @@ -36,10 +36,11 @@ void variant_mainboard_final(void) */ pcr_or32(PID_LPC, PCR_LPC_PRC, (PCR_LPC_CCE_EN | PCR_LPC_PCE_EN)); - /* Set Master Enable for on-board PCI device. */ + /* Set Master Enable for on-board PCI device if allowed. */ dev = dev_find_device(PCI_VENDOR_ID_SIEMENS, 0x403e, 0); if (dev) { - pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER); + if (CONFIG(PCI_ALLOW_BUS_MASTER)) + pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER); /* Disable clock outputs 0 and 2-4 (CLKOUT) for upstream * XIO2001 PCIe to PCI Bridge. diff --git a/src/mainboard/siemens/mc_apl1/variants/mc_apl5/mainboard.c b/src/mainboard/siemens/mc_apl1/variants/mc_apl5/mainboard.c index 7554fee6f1..82528d5952 100644 --- a/src/mainboard/siemens/mc_apl1/variants/mc_apl5/mainboard.c +++ b/src/mainboard/siemens/mc_apl1/variants/mc_apl5/mainboard.c @@ -43,10 +43,11 @@ void variant_mainboard_final(void) */ pcr_rmw32(PID_MODPHY, TX_DWORD3, (0x00 << 16), (0x4a << 16)); - /* Set Master Enable for on-board PCI device. */ + /* Set Master Enable for on-board PCI device if allowed. */ dev = dev_find_device(PCI_VENDOR_ID_SIEMENS, 0x403e, 0); if (dev) { - pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER); + if (CONFIG(PCI_ALLOW_BUS_MASTER)) + pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER); /* Disable clock outputs 0-3 (CLKOUT) for upstream XIO2001 PCIe * to PCI Bridge. */ diff --git a/src/mainboard/siemens/mc_apl1/variants/mc_apl6/mainboard.c b/src/mainboard/siemens/mc_apl1/variants/mc_apl6/mainboard.c index 1cecef7c00..2a8dd9b20f 100644 --- a/src/mainboard/siemens/mc_apl1/variants/mc_apl6/mainboard.c +++ b/src/mainboard/siemens/mc_apl1/variants/mc_apl6/mainboard.c @@ -36,10 +36,11 @@ void variant_mainboard_final(void) */ pcr_or32(PID_LPC, PCR_LPC_PRC, (PCR_LPC_CCE_EN | PCR_LPC_PCE_EN)); - /* Set Master Enable for on-board PCI device. */ + /* Set Master Enable for on-board PCI device if allowed. */ dev = dev_find_device(PCI_VENDOR_ID_SIEMENS, 0x403e, 0); if (dev) { - pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER); + if (CONFIG(PCI_ALLOW_BUS_MASTER)) + pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER); /* Disable clock outputs 0-3 (CLKOUT) for upstream * XIO2001 PCIe to PCI Bridge. |