ChromeOS: Remove oprom_is_loaded

A global flag oprom_is_loaded was used to indicate to
U-boot that VGA option ROM was loaded and run, or that
native VGA init was completed on GMA device.

Implement this feature without dependency to CHROMEOS option
and replace use of global variable oprom_is_loaded with call
to gfx_get_init_done().

Change-Id: I7e1afd752f18e5346dabdee62e4f7ea08ada5faf
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/4309
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
diff --git a/src/device/pci_device.c b/src/device/pci_device.c
index ca36046..dfc0898 100644
--- a/src/device/pci_device.c
+++ b/src/device/pci_device.c
@@ -32,6 +32,7 @@
 #include <device/device.h>
 #include <device/pci.h>
 #include <device/pci_ids.h>
+#include <bootmode.h>
 #include <delay.h>
 #if CONFIG_HYPERTRANSPORT_PLUGIN_SUPPORT
 #include <device/hypertransport.h>
@@ -660,10 +661,6 @@
 			   ((device & 0xffff) << 16) | (vendor & 0xffff));
 }
 
-#if CONFIG_CHROMEOS
-int oprom_is_loaded = 0;
-#endif
-
 #if CONFIG_VGA_ROM_RUN
 static int should_run_oprom(struct device *dev)
 {
@@ -733,10 +730,8 @@
 		return;
 
 	run_bios(dev, (unsigned long)ram);
-#if CONFIG_CHROMEOS
-	oprom_is_loaded = 1;
-	printk(BIOS_DEBUG, "VGA Option ROM has been loaded\n");
-#endif
+	gfx_set_init_done(1);
+	printk(BIOS_DEBUG, "VGA Option ROM was run\n");
 #endif /* CONFIG_VGA_ROM_RUN */
 }