diff options
author | Mario Scheithauer <mario.scheithauer@siemens.com> | 2018-11-28 09:13:28 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2018-11-29 12:17:06 +0000 |
commit | a94a153477584ba2d168021f23fa571f048e6767 (patch) | |
tree | 721c9b969e6f0868a530b0dee63116565f337ac0 /src | |
parent | 36a4a9d4146b765a544005f98027176da62c091c (diff) |
siemens/mc_apl5: Set bus master bit for on-board PCI device
There is an on-board PCI device where bus master has to be enabled in
PCI configuration space. As there is no need for a complete PCI driver
for this device just set the bus master bit in mainboard_final().
Change-Id: I4ab40e34253c20adaacfdf42050314e06547eefb
Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-on: https://review.coreboot.org/c/29881
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/siemens/mc_apl1/variants/mc_apl5/mainboard.c | 10 |
1 files changed, 10 insertions, 0 deletions
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 6d22fd9826..06b2a2fc92 100644 --- a/src/mainboard/siemens/mc_apl1/variants/mc_apl5/mainboard.c +++ b/src/mainboard/siemens/mc_apl1/variants/mc_apl5/mainboard.c @@ -15,6 +15,7 @@ #include <bootstate.h> #include <console/console.h> +#include <device/pci_def.h> #include <device/pci_ids.h> #include <device/pci_ops.h> #include <gpio.h> @@ -33,6 +34,7 @@ void variant_mainboard_final(void) { int status; struct device *dev = NULL; + uint16_t cmd; /* * Set up the DP2LVDS converter. @@ -73,6 +75,14 @@ void variant_mainboard_final(void) * The value 0x4a sets the swing level to 0.58 V. */ pcr_rmw32(PID_MODPHY, TX_DWORD3, (0x00 << 16), (0x4a << 16)); + + /* Set Master Enable for on-board PCI device. */ + dev = dev_find_device(PCI_VENDOR_ID_SIEMENS, 0x403e, 0); + if (dev) { + cmd = pci_read_config16(dev, PCI_COMMAND); + cmd |= PCI_COMMAND_MASTER; + pci_write_config16(dev, PCI_COMMAND, cmd); + } } static void wait_for_legacy_dev(void *unused) |