summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorWerner Zeh <werner.zeh@siemens.com>2017-06-28 12:56:31 +0200
committerMartin Roth <martinroth@google.com>2017-06-29 14:42:05 +0000
commit96b89ae5eba88227f31eaec72351e46d3de9ee9a (patch)
tree3b0dce0518f23b5ec17801a889fb28839138dc29 /src/mainboard
parent7c789702149a893d0c82c57edbb8705e9f6f95e9 (diff)
mb/siemens/mc_bdx1: Set bus master bit for on-board PCI devices
There are up to two on-board PCI devices where bus master has to be enabled in PCI config space. As there is no need for a complete PCI driver for these devices just set the bus master bit in mainboard_final(). In a perfect world that would be the task of the runtime driver which unfortunately don't do that. Change-Id: Ic2896d5e7568a455737af26b14b2c398caae5f72 Signed-off-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-on: https://review.coreboot.org/20403 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/siemens/mc_bdx1/mainboard.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mainboard/siemens/mc_bdx1/mainboard.c b/src/mainboard/siemens/mc_bdx1/mainboard.c
index fe35fe1c14..c20778d1f1 100644
--- a/src/mainboard/siemens/mc_bdx1/mainboard.c
+++ b/src/mainboard/siemens/mc_bdx1/mainboard.c
@@ -20,6 +20,7 @@
#include <device/device.h>
#include <device/pci_def.h>
#include <device/pci_ops.h>
+#include <device/pci_ids.h>
#include <console/console.h>
#if CONFIG_VGA_ROM_RUN
#include <x86emu/x86emu.h>
@@ -125,6 +126,20 @@ static void mainboard_final(void *chip_info)
write16((spi_base + SPI_REG_OPTYPE), SPI_OPTYPE);
write32((spi_base + SPI_REG_OPMENU_L), SPI_OPMENU_LOWER);
write32((spi_base + SPI_REG_OPMENU_H), SPI_OPMENU_UPPER);
+
+ /* Set Master Enable for on-board PCI devices. */
+ dev = dev_find_device(PCI_VENDOR_ID_SIEMENS, 0x403e, 0);
+ if (dev) {
+ uint16_t cmd = pci_read_config16(dev, PCI_COMMAND);
+ cmd |= PCI_COMMAND_MASTER;
+ pci_write_config16(dev, PCI_COMMAND, cmd);
+ }
+ dev = dev_find_device(PCI_VENDOR_ID_SIEMENS, 0x403f, 0);
+ if (dev) {
+ uint16_t cmd = pci_read_config16(dev, PCI_COMMAND);
+ cmd |= PCI_COMMAND_MASTER;
+ pci_write_config16(dev, PCI_COMMAND, cmd);
+ }
}
/** \brief This function can decide if a given MAC address is valid or not.