summaryrefslogtreecommitdiff
path: root/src/mainboard/intel
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2021-11-03 08:01:20 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2021-11-11 06:22:19 +0000
commitbc94d60924483606763a68b313c57559ae759dd7 (patch)
tree14771042790d77f57a3bd2c8bf1fe2be47b7eb31 /src/mainboard/intel
parent6df98f066b80b1bb5e18a8c339c2748c3b9dc467 (diff)
intel/strago: Fix some CHROMEOS guards
MAINBOARD_HAS_CHROMEOS always evaluates true for this board. The commentary about get_write_protect_state() was wrong, it's currently only called in ramstage. Change-Id: I0d5f1520a180ae6762c07dca7284894d9cf661b4 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/58924 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/mainboard/intel')
-rw-r--r--src/mainboard/intel/strago/Makefile.inc8
-rw-r--r--src/mainboard/intel/strago/chromeos.c7
2 files changed, 7 insertions, 8 deletions
diff --git a/src/mainboard/intel/strago/Makefile.inc b/src/mainboard/intel/strago/Makefile.inc
index 21ae380e4b..004a6a248e 100644
--- a/src/mainboard/intel/strago/Makefile.inc
+++ b/src/mainboard/intel/strago/Makefile.inc
@@ -2,11 +2,11 @@
bootblock-$(CONFIG_ENABLE_BUILTIN_COM1) += com_init.c
-romstage-$(CONFIG_MAINBOARD_HAS_CHROMEOS) += chromeos.c
+ramstage-$(CONFIG_CHROMEOS) += chromeos.c
+romstage-$(CONFIG_CHROMEOS) += chromeos.c
-ramstage-$(CONFIG_MAINBOARD_HAS_CHROMEOS) += chromeos.c
-ramstage-$(CONFIG_MAINBOARD_HAS_CHROMEOS) += ec.c
-ramstage-$(CONFIG_MAINBOARD_HAS_CHROMEOS) += gpio.c
+ramstage-y += ec.c
+ramstage-y += gpio.c
ramstage-y += irqroute.c
ramstage-y += ramstage.c
ramstage-y += w25q64.c
diff --git a/src/mainboard/intel/strago/chromeos.c b/src/mainboard/intel/strago/chromeos.c
index c0ce968ecf..ad23ea1aff 100644
--- a/src/mainboard/intel/strago/chromeos.c
+++ b/src/mainboard/intel/strago/chromeos.c
@@ -23,14 +23,13 @@ void fill_lb_gpios(struct lb_gpios *gpios)
int get_write_protect_state(void)
{
/*
- * The vboot loader queries this function in romstage. The GPIOs have
+ * This function might get queried early in romstage. The GPIOs have
* not been set up yet as that configuration is done in ramstage.
* Configuring this GPIO as input so that there isn't any ambiguity
* in the reading.
*/
-#if ENV_ROMSTAGE
- gpio_input_pullup(WP_GPIO);
-#endif
+ if (ENV_ROMSTAGE_OR_BEFORE)
+ gpio_input_pullup(WP_GPIO);
/* WP is enabled when the pin is reading high. */
return !!gpio_get(WP_GPIO);