[coreboot-gerrit] Change in coreboot[master]: siemens/mc_apl3: Set bus master bit for on-board PCI device

Mario Scheithauer (Code Review) gerrit at coreboot.org
Wed Nov 7 08:54:45 CET 2018


Mario Scheithauer has uploaded this change for review. ( https://review.coreboot.org/29528


Change subject: siemens/mc_apl3: Set bus master bit for on-board PCI device
......................................................................

siemens/mc_apl3: 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: I1ef4a7774d4ca75c230063debbc63d03486fed6f
Signed-off-by: Mario Scheithauer <mario.scheithauer at siemens.com>
---
M src/mainboard/siemens/mc_apl1/variants/mc_apl3/mainboard.c
1 file changed, 10 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/28/29528/1

diff --git a/src/mainboard/siemens/mc_apl1/variants/mc_apl3/mainboard.c b/src/mainboard/siemens/mc_apl1/variants/mc_apl3/mainboard.c
index bfcf38e..f41fe73 100644
--- a/src/mainboard/siemens/mc_apl1/variants/mc_apl3/mainboard.c
+++ b/src/mainboard/siemens/mc_apl1/variants/mc_apl3/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>
@@ -31,6 +32,7 @@
 void variant_mainboard_final(void)
 {
 	struct device *dev = NULL;
+	uint16_t cmd = 0;
 
 	/* PIR6 register mapping for PCIe root ports
 	 * INTA#->PIRQD#, INTB#->PIRQA#, INTC#->PIRQB#, INTD#-> PIRQC#
@@ -52,6 +54,14 @@
 	 * offset 0x341C bit [3:0].
 	 */
 	pcr_or32(PID_LPC, PCR_LPC_PRC, (PCR_LPC_CCE_EN | PCR_LPC_PCE_EN));
+
+	/* 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)

-- 
To view, visit https://review.coreboot.org/29528
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1ef4a7774d4ca75c230063debbc63d03486fed6f
Gerrit-Change-Number: 29528
Gerrit-PatchSet: 1
Gerrit-Owner: Mario Scheithauer <mario.scheithauer at siemens.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181107/26395b3e/attachment.html>


More information about the coreboot-gerrit mailing list