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>
This commit is contained in:
parent
7c78970214
commit
96b89ae5eb
|
@ -20,6 +20,7 @@
|
||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
#include <device/pci_def.h>
|
#include <device/pci_def.h>
|
||||||
#include <device/pci_ops.h>
|
#include <device/pci_ops.h>
|
||||||
|
#include <device/pci_ids.h>
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#if CONFIG_VGA_ROM_RUN
|
#if CONFIG_VGA_ROM_RUN
|
||||||
#include <x86emu/x86emu.h>
|
#include <x86emu/x86emu.h>
|
||||||
|
@ -125,6 +126,20 @@ static void mainboard_final(void *chip_info)
|
||||||
write16((spi_base + SPI_REG_OPTYPE), SPI_OPTYPE);
|
write16((spi_base + SPI_REG_OPTYPE), SPI_OPTYPE);
|
||||||
write32((spi_base + SPI_REG_OPMENU_L), SPI_OPMENU_LOWER);
|
write32((spi_base + SPI_REG_OPMENU_L), SPI_OPMENU_LOWER);
|
||||||
write32((spi_base + SPI_REG_OPMENU_H), SPI_OPMENU_UPPER);
|
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.
|
/** \brief This function can decide if a given MAC address is valid or not.
|
||||||
|
|
Loading…
Reference in New Issue