storm: handle dual purpose recovery button

Hardware / Coreboot - Vadim Bendebury [chromium.org] - 17 April 2015 03:03 UTC

Storm devices' recovery button is overloaded. Pressing it when the system is running is supposed to reset the device. To trigger recovery mode the button must be held pressed for at least 5 seconds after reset.

Currently interpreting the recovery button state is the responsibility of the board (vboot gets a consolidated state, which is a combination of several conditions), so the simplest way to implement this feature is to make the board follow the recovery button state.

In case the button is not pressed when it is first sampled, its state is saved immediately and no recovery request is reported. In case the button is pressed when it is first sampled, the board code keeps polling it up to 5 seconds and acts accordingly.

BRANCH=storm BUG=chrome-os-partner:36059 TEST=tried starting a whirlwind with recovery button pressed for
various durations, it entered recovery mode when the button was pressed longer than 5 seconds.

Change-Id: Icb3250be7c2a76089c070acd68cb521d1399e245

f61809a storm: handle dual purpose recovery button
src/mainboard/google/storm/chromeos.c | 29 ++++++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)

Upstream: review.coreboot.org


  • Share