summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Zeh <werner.zeh@siemens.com>2017-10-16 08:53:34 +0200
committerMartin Roth <martinroth@google.com>2017-10-22 01:38:12 +0000
commitbd31642ad8cc8302e2455a072a745dad9ea579b9 (patch)
treea24cdeb592f25aaefb3efcd7be6bf4168715adc4
parentb6ac3a299769ad458dbc28c6348f186342d4d556 (diff)
intel/i210: Set bus master bit in command register
There are still Ethernet drivers out there in the wild which expect that the master enable bit was set by firmware. A missing master enable bit will lead to a non-functional driver. Though it is clear the task of the driver to set this bit it is too late now. So work around this issue on firmware level...again! Change-Id: I677b22c643b73634b1a2129d948b991446e1f8fd Signed-off-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-on: https://review.coreboot.org/22036 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com>
-rw-r--r--src/drivers/intel/i210/i210.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/drivers/intel/i210/i210.c b/src/drivers/intel/i210/i210.c
index 656e4f3c89..47b6d16d0b 100644
--- a/src/drivers/intel/i210/i210.c
+++ b/src/drivers/intel/i210/i210.c
@@ -1,7 +1,7 @@
/*
* This file is part of the coreboot project.
*
- * Copyright (C) 2014-2016 Siemens AG.
+ * Copyright (C) 2014-2017 Siemens AG.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,6 +19,7 @@
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
+#include <device/pci_def.h>
#include <string.h>
#include <types.h>
#include <delay.h>
@@ -218,9 +219,15 @@ static void init(struct device *dev)
return;
}
+static void set_resources(device_t dev)
+{
+ pci_dev_set_resources(dev);
+ dev->command |= PCI_COMMAND_MASTER;
+}
+
static struct device_operations i210_ops = {
.read_resources = pci_dev_read_resources,
- .set_resources = pci_dev_set_resources,
+ .set_resources = set_resources,
.enable_resources = pci_dev_enable_resources,
.init = init,
.scan_bus = 0,