summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainboard/google/butterfly/chromeos.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/mainboard/google/butterfly/chromeos.c b/src/mainboard/google/butterfly/chromeos.c
index 2825aae553..635aaee5e4 100644
--- a/src/mainboard/google/butterfly/chromeos.c
+++ b/src/mainboard/google/butterfly/chromeos.c
@@ -66,18 +66,17 @@ int get_recovery_mode_switch(void)
{
int ec_rec_mode = 0;
-#if FORCE_RECOVERY_MODE
- printk(BIOS_DEBUG,"FORCING RECOVERY MODE.\n");
- return 1;
-#endif
+ if (FORCE_RECOVERY_MODE) {
+ printk(BIOS_DEBUG, "FORCING RECOVERY MODE.\n");
+ return 1;
+ }
+ if (ENV_RAMSTAGE) {
+ if (ec_mem_read(EC_CODE_STATE) == EC_COS_EC_RO)
+ ec_rec_mode = 1;
-#ifndef __PRE_RAM__
- if (ec_mem_read(EC_CODE_STATE) == EC_COS_EC_RO) {
- ec_rec_mode = 1;
+ printk(BIOS_DEBUG, "RECOVERY MODE FROM EC: %x\n", ec_rec_mode);
}
- printk(BIOS_DEBUG,"RECOVERY MODE FROM EC: %x\n", ec_rec_mode);
-#endif
return ec_rec_mode;
}