diff options
author | Werner Zeh <werner.zeh@siemens.com> | 2021-07-20 07:33:20 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-07-21 16:23:48 +0000 |
commit | 1412ffab198ae101e76c0d2bf4da808660027228 (patch) | |
tree | 795125bf131cdc0b8afe68f7d655adabab029c0a /src/mainboard/siemens/mc_apl1/mainboard.c | |
parent | 061a93f93d2a3460423a50448e428cf08d282fff (diff) |
mb/siemens/mc_apl{1,2,3,5,6}: Set PCI bus master bit only if allowed
Take Kconfig switch PCI_ALLOW_BUS_MASTER into account and set the PCI
bus master bit for legacy devices only if it is allowed.
Change-Id: I7798a767d528419bb093f301140ab68cc8b9c5ae
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56442
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Diffstat (limited to 'src/mainboard/siemens/mc_apl1/mainboard.c')
-rw-r--r-- | src/mainboard/siemens/mc_apl1/mainboard.c | 10 |
1 files changed, 6 insertions, 4 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(); |