From 96b89ae5eba88227f31eaec72351e46d3de9ee9a Mon Sep 17 00:00:00 2001 From: Werner Zeh Date: Wed, 28 Jun 2017 12:56:31 +0200 Subject: 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 Reviewed-on: https://review.coreboot.org/20403 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber Reviewed-by: Paul Menzel --- src/mainboard/siemens/mc_bdx1/mainboard.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/mainboard/siemens') 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 #include #include +#include #include #if CONFIG_VGA_ROM_RUN #include @@ -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. -- cgit v1.2.3