diff options
author | Marek BehĂșn <marek.behun@nic.cz> | 2019-05-02 16:53:37 +0200 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2019-05-03 08:14:39 +0200 |
commit | 539f0242f3c6398fe13cbbd584c23dc6cfb4ba04 (patch) | |
tree | 4992589968a333a2bf5b47a1d49ec7331678656d /board/olimex/mx23_olinuxino/spl_boot.c | |
parent | 2151926b0886c17338cd7cba22ffb6dec65c5867 (diff) |
arm: mvebu: turris_omnia: add RESET button handling
There is a Factory RESET button on the back side of the Turris Omnia
router. When user presses this button before powering the device up and
keeps it pressed, the microcontroller prevents the main CPU from booting
and counts how long the RESET button is being pressed (and indicates
this by lighting up front LEDs).
The idea behind this is that the user can boot the device into several
Factory RESET modes.
This patch adds support for U-Boot to read into which Factory RESET mode
the user booted the device. The value is an integer stored into the
omnia_reset environment variable. It is 0 if the button was not pressed
at all during power up, otherwise it is the number identifying the
Factory RESET mode.
This patch also changes bootcmd to a special hardcoded value if Factory
RESET button was pressed during device powerup. This special bootcmd
value sets the colors of all the LEDs on the front panel to green and
then tries to load the rescue image from the SPI flash memory and boot
it.
Signed-off-by: Marek BehĂșn <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board/olimex/mx23_olinuxino/spl_boot.c')
0 files changed, 0 insertions, 0 deletions