summaryrefslogtreecommitdiff
path: root/src/drivers/intel
diff options
context:
space:
mode:
authorWerner Zeh <werner.zeh@siemens.com>2021-07-20 06:45:50 +0200
committerPatrick Georgi <pgeorgi@google.com>2021-07-23 13:18:14 +0000
commit35e1fca8f203792c7c2c79420843557f8d55b079 (patch)
tree07b8595e1ddcbf67d20311100f375d325d8fe0db /src/drivers/intel
parente85b6de80430b3598423a4ef75f9e50d1a303199 (diff)
drivers/intel/i210: Set PCI bus master bit only if allowed
Set the bus master bit only if the global Kconfig switch PCI_ALLOW_BUS_MASTER_ANY_DEVICE is enabled. For now the bus master bit is needed for i210 because of some old OS drivers that do not set it and won't work properly without it. Change-Id: I6f727e7f513f4320740fbf49e741cea86edb3247 Signed-off-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/56441 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/drivers/intel')
-rw-r--r--src/drivers/intel/i210/i210.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drivers/intel/i210/i210.c b/src/drivers/intel/i210/i210.c
index 8caa194a9e..32cae6f269 100644
--- a/src/drivers/intel/i210/i210.c
+++ b/src/drivers/intel/i210/i210.c
@@ -208,7 +208,8 @@ static void init(struct device *dev)
static void enable_bus_master(struct device *dev)
{
- pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER);
+ if (CONFIG(PCI_ALLOW_BUS_MASTER_ANY_DEVICE))
+ pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER);
}
static struct device_operations i210_ops = {