linkb_to_host and addon display card override onboard card.
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1880 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
diff --git a/src/devices/pci_rom.c b/src/devices/pci_rom.c
index 310c00f..92f0b09 100644
--- a/src/devices/pci_rom.c
+++ b/src/devices/pci_rom.c
@@ -57,6 +57,7 @@
#if CONFIG_CONSOLE_VGA == 1
int vga_inited = 0; // it will be used by vga_console
+extern device_t vga_pri; // The only VGA
#endif
struct rom_header *pci_rom_load(struct device *dev, struct rom_header *rom_header)
@@ -71,7 +72,7 @@
if (PCI_CLASS_DISPLAY_VGA == (rom_data->class_hi << 16 | rom_data->class_lo)) {
#if CONFIG_CONSOLE_VGA == 1
- if(vga_inited) return NULL; // only one VGA supported
+ if (dev != vga_pri) return NULL; // only one VGA supported
printk_spew("%s, copying VGA ROM Image from %x to %x, %x bytes\n",
__func__, rom_header, PCI_VGA_RAM_IMAGE_START, rom_size);
memcpy(PCI_VGA_RAM_IMAGE_START, rom_header, rom_size);