summaryrefslogtreecommitdiff
path: root/src/vendorcode/google/chromeos
diff options
context:
space:
mode:
Diffstat (limited to 'src/vendorcode/google/chromeos')
-rw-r--r--src/vendorcode/google/chromeos/chromeos.h1
-rw-r--r--src/vendorcode/google/chromeos/gnvs.c19
2 files changed, 10 insertions, 10 deletions
diff --git a/src/vendorcode/google/chromeos/chromeos.h b/src/vendorcode/google/chromeos/chromeos.h
index abdd6c2a77..da25617121 100644
--- a/src/vendorcode/google/chromeos/chromeos.h
+++ b/src/vendorcode/google/chromeos/chromeos.h
@@ -25,7 +25,6 @@ void mainboard_prepare_cr50_reset(void);
void cbmem_add_vpd_calibration_data(void);
void chromeos_set_me_hash(u32*, int);
void chromeos_set_ramoops(void *ram_oops, size_t size);
-void chromeos_set_ecfw_rw(void);
void chromeos_init_chromeos_acpi(void);
/**
diff --git a/src/vendorcode/google/chromeos/gnvs.c b/src/vendorcode/google/chromeos/gnvs.c
index 7821786979..b1090a44e9 100644
--- a/src/vendorcode/google/chromeos/gnvs.c
+++ b/src/vendorcode/google/chromeos/gnvs.c
@@ -2,6 +2,7 @@
#include <acpi/acpi.h>
#include <acpi/acpigen.h>
+#include <bootmode.h>
#include <types.h>
#include <string.h>
#include <stdlib.h>
@@ -31,6 +32,8 @@ static size_t chromeos_vpd_region(const char *region, uintptr_t *base)
return region_device_sz(&vpd);
}
+__weak bool mainboard_ec_running_ro(void) { return true; }
+
void chromeos_init_chromeos_acpi(void)
{
size_t vpd_size;
@@ -59,8 +62,13 @@ void chromeos_init_chromeos_acpi(void)
/* EC can override to ECFW_RW. */
chromeos_acpi->vbt2 = ACTIVE_ECFW_RO;
- if (CONFIG(EC_GOOGLE_CHROMEEC) && !google_ec_running_ro())
- chromeos_acpi->vbt2 = ACTIVE_ECFW_RW;
+ if (CONFIG(EC_GOOGLE_CHROMEEC)) {
+ if (!google_ec_running_ro())
+ chromeos_acpi->vbt2 = ACTIVE_ECFW_RW;
+ } else {
+ if (!mainboard_ec_running_ro())
+ chromeos_acpi->vbt2 = ACTIVE_ECFW_RW;
+ }
}
void chromeos_set_me_hash(u32 *hash, int len)
@@ -83,13 +91,6 @@ void chromeos_set_ramoops(void *ram_oops, size_t size)
chromeos_acpi->ramoops_len = size;
}
-void chromeos_set_ecfw_rw(void)
-{
- if (!chromeos_acpi)
- return;
- chromeos_acpi->vbt2 = ACTIVE_ECFW_RW;
-}
-
void smbios_type0_bios_version(uintptr_t address)
{
if (!chromeos_acpi)