[coreboot] [v2] r4738 - trunk/coreboot-v2/src/devices

svn at coreboot.org svn at coreboot.org
Wed Oct 7 20:41:08 CEST 2009


Author: myles
Date: 2009-10-07 20:41:08 +0200 (Wed, 07 Oct 2009)
New Revision: 4738

Modified:
   trunk/coreboot-v2/src/devices/pci_device.c
Log:
Kconfig allows you to run all PCI ROMs, VGA only, or non-VGA only.
Update the code to support that too.

Remove an unused variable.

Signed-off-by: Myles Watson <mylesgw at gmail.com>
Acked-by: Peter Stuge <peter at stuge.se>


Modified: trunk/coreboot-v2/src/devices/pci_device.c
===================================================================
--- trunk/coreboot-v2/src/devices/pci_device.c	2009-10-07 18:07:49 UTC (rev 4737)
+++ trunk/coreboot-v2/src/devices/pci_device.c	2009-10-07 18:41:08 UTC (rev 4738)
@@ -669,15 +669,14 @@
 	void run_bios(struct device *dev, unsigned long addr);
 	struct rom_header *rom, *ram;
 
-#if CONFIG_PCI_ROM_RUN != 1
-	/* We want to execute VGA option ROMs when CONFIG_VGA_ROM_RUN
-	 * is set but CONFIG_PCI_ROM_RUN is not. In this case we skip
-	 * all other option ROM types.
-	 */
-	if ((dev->class >> 8) != PCI_CLASS_DISPLAY_VGA)
+	if (CONFIG_PCI_ROM_RUN != 1 && /* Only execute VGA ROMs. */
+	    ((dev->class >> 8) != PCI_CLASS_DISPLAY_VGA))
 		return;
-#endif
 
+	if (CONFIG_VGA_ROM_RUN != 1 && /* Only execute non-VGA ROMs. */
+	    ((dev->class >> 8) == PCI_CLASS_DISPLAY_VGA))
+		return;
+
 	rom = pci_rom_probe(dev);
 	if (rom == NULL)
 		return;
@@ -1224,7 +1223,6 @@
 	device_t pdev;
 	u8 line;
 	u8 irq;
-	u8 readback;
 
 	/* Each slot may contain up to eight functions */
 	for (funct = 0; funct < 8; funct++) {
@@ -1248,8 +1246,8 @@
 			pIntAtoD[line - 1]);
 
 #ifdef PARANOID_IRQ_ASSIGNMENTS
-		readback = pci_read_config8(pdev, PCI_INTERRUPT_LINE);
-		printk_debug("  Readback = %d\n", readback);
+		irq = pci_read_config8(pdev, PCI_INTERRUPT_LINE);
+		printk_debug("  Readback = %d\n", irq);
 #endif
 
 		// Change to level triggered





More information about the coreboot mailing list