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>
This commit is contained in:
parent
6df98f066b
commit
bc94d60924
|
@ -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
|
||||
|
|
|
@ -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
|
||||
if (ENV_ROMSTAGE_OR_BEFORE)
|
||||
gpio_input_pullup(WP_GPIO);
|
||||
#endif
|
||||
|
||||
/* WP is enabled when the pin is reading high. */
|
||||
return !!gpio_get(WP_GPIO);
|
||||
|
|
Loading…
Reference in New Issue