Yuji Sasaki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32904
Change subject: TEMP: NOT FOR REVIEW: google/mistral: Limit FDR detection for verstage ......................................................................
TEMP: NOT FOR REVIEW: google/mistral: Limit FDR detection for verstage
FDR switch detection and LED state change must only be functional when called in verstage. get_recovery_mode_switch() is called from ramstage as part of elog function but this is informational purpose, should not affecting LED state and boot mode. This CL is adding #if directives to limit FDR detection for verstage. When get_recovery_mode_switch() is called from other stages, it just return current FDR switch state but do not change LED state or boot mode.
BUG=b:131622855 TEST=Build and run on DUT, keep pushing FDR switch and power on, verify it do not fall into secondary FDR detection loop in ramstage after "recovery requested" in verstage. Signed-off-by: Yuji Sasaki sasakiy@chromium.org
Change-Id: Ib034acca2bcf39728e58b468e69e74620b086a10 --- M src/mainboard/google/mistral/chromeos.c 1 file changed, 19 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32904/1
diff --git a/src/mainboard/google/mistral/chromeos.c b/src/mainboard/google/mistral/chromeos.c index f220151..8873edd 100644 --- a/src/mainboard/google/mistral/chromeos.c +++ b/src/mainboard/google/mistral/chromeos.c @@ -67,6 +67,11 @@ wipeout_req };
+/* + * FDR switch detection and LED state change is only functional + * when called in verstage. + */ +#if defined(__VERSTAGE__) static void display_pattern(int pattern) { led_lp5562_display_pattern(BLSP_QUP_ID_1, pattern); @@ -130,6 +135,20 @@ return saved_state; }
+/* + * get_recovery_mode_switch is called from ramstage as part of + * elog function, but this is informational purpose to show current + * FDR switch state, should not affecting LED and boot mode. + */ +#else // defined(__VERSTAGE) +static enum switch_state get_rec_sw_state(void) +{ + gpio_t rec_sw = GPIO_REC_STATE; + int sampled_value = !gpio_get(rec_sw); + return sampled_value ? recovery_req : no_req; +} +#endif // defined(__VERSTAGE) + int get_recovery_mode_switch(void) { return get_rec_sw_state() == recovery_req;
Yuji Sasaki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32904 )
Change subject: TEMP: NOT FOR REVIEW: google/mistral: Limit FDR detection for verstage ......................................................................
Patch Set 1:
This is CL to avoid secondary FDR switch detection loop in ramstage.
Patrick Georgi has uploaded a new patch set (#14) to the change originally created by Yuji Sasaki. ( https://review.coreboot.org/c/coreboot/+/32904 )
Change subject: google/mistral: Limit FDR detection for verstage ......................................................................
google/mistral: Limit FDR detection for verstage
FDR switch detection and LED state change must only be functional when called in verstage. get_recovery_mode_switch() is called from ramstage as part of elog function but this is informational purpose, should not affecting LED state and boot mode. This CL is adding #if directives to limit FDR detection for verstage. When get_recovery_mode_switch() is called from other stages, it just return current FDR switch state but do not change LED state or boot mode.
BUG=b:131622855 TEST=Build and run on DUT, keep pushing FDR switch and power on, verify it do not fall into secondary FDR detection loop in ramstage after "recovery requested" in verstage. Signed-off-by: Yuji Sasaki sasakiy@chromium.org
Change-Id: Ib034acca2bcf39728e58b468e69e74620b086a10 --- M src/mainboard/google/mistral/chromeos.c 1 file changed, 19 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32904/14
Patrick Georgi has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/32904 )
Change subject: google/mistral: Limit FDR detection for verstage ......................................................................
Abandoned
won't be finished here