device: Conditionally bypass oprom execution

Builds with CHROMEOS can bypass VGA oprom when boot is not in
developer or recovery modes. Have the same functionality available
without CHROMEOS but with BOOTMODE_STRAPS.

Change-Id: I97644364305dc05aad78a744599476ccc58db163
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/5595
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@google.com>
This commit is contained in:
Kyösti Mälkki 2013-12-22 00:22:49 +02:00
parent ab56b3b11c
commit 9ab1c106c3
1 changed files with 9 additions and 11 deletions

View File

@ -669,20 +669,18 @@ static int should_run_oprom(struct device *dev)
if (should_run >= 0) if (should_run >= 0)
return should_run; return should_run;
#if CONFIG_CHROMEOS /* Don't run VGA option ROMs, unless we have to print
/* In ChromeOS we want to boot blazingly fast. Therefore
* we don't run (VGA) option ROMs, unless we have to print
* something on the screen before the kernel is loaded. * something on the screen before the kernel is loaded.
*/ */
if (!developer_mode_enabled() && !recovery_mode_enabled() && should_run = !IS_ENABLED(CONFIG_BOOTMODE_STRAPS) ||
!vboot_wants_oprom()) { developer_mode_enabled() || recovery_mode_enabled();
printk(BIOS_DEBUG, "Not running VGA Option ROM\n");
should_run = 0;
return should_run;
}
#endif
should_run = 1;
#if CONFIG_CHROMEOS
if (!should_run)
should_run = vboot_wants_oprom();
#endif
if (!should_run)
printk(BIOS_DEBUG, "Not running VGA Option ROM\n");
return should_run; return should_run;
} }