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@gmail.com>
Acked-by: Peter Stuge <peter@stuge.se>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4738 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Myles Watson 2009-10-07 18:41:08 +00:00
parent 877119a995
commit 17aeecab89
1 changed files with 8 additions and 10 deletions

View File

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