Don't check if the option ROM was loaded unless it matters.

If whether the option ROM was loaded doesn't matter, there's no reason to check
if it was. That frees Coreboot from having to provide that entry in the GPIO
Coreboot table.

BUG=chrome-os-partner:18636
TEST=Booted on Snow. Booted on Link in normal and developer modes.
BRANCH=None

Change-Id: Ie61443aad03e9420437fffb3ae2c40f08f958416
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/48198
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
diff --git a/src/netboot/main.c b/src/netboot/main.c
index 7743aa6..91e1e2f 100644
--- a/src/netboot/main.c
+++ b/src/netboot/main.c
@@ -45,13 +45,16 @@
 
 static void enable_graphics(void)
 {
+	if (!CONFIG_OPROM_MATTERS)
+		return;
+
 	int oprom_loaded = flag_fetch(FLAG_OPROM);
 
 	// Manipulating vboot's internal data and calling its internal
 	// functions is NOT NICE and will give you athlete's foot and make
 	// you unpopular at parties. Right now it's the only way to ensure
 	// graphics are enabled, though, so it's a necessary evil.
-	if (CONFIG_OPROM_MATTERS && !oprom_loaded) {
+	if (!oprom_loaded) {
 		printf("Enabling graphics.\n");
 
 		VbNvContext context;
diff --git a/src/vboot/stages.c b/src/vboot/stages.c
index a8e0817..9fd4850 100644
--- a/src/vboot/stages.c
+++ b/src/vboot/stages.c
@@ -51,7 +51,9 @@
 	int dev_switch = flag_fetch(FLAG_DEVSW);
 	int rec_switch = flag_fetch(FLAG_RECSW);
 	int wp_switch = flag_fetch(FLAG_WPSW);
-	int oprom_loaded = flag_fetch(FLAG_OPROM);
+	int oprom_loaded = 0;
+	if (CONFIG_OPROM_MATTERS)
+		oprom_loaded = flag_fetch(FLAG_OPROM);
 	if (dev_switch < 0 || rec_switch < 0 ||
 	    wp_switch < 0 || oprom_loaded < 0) {
 		// An error message should have already been printed.