arm: mvebu: turris_mox: Always handle reset button
authorMarek Behún <marek.behun@nic.cz>
Sat, 9 Oct 2021 17:33:41 +0000 (19:33 +0200)
committerStefan Roese <sr@denx.de>
Thu, 21 Oct 2021 05:39:05 +0000 (07:39 +0200)
Handle reset button even if we can't configure modules.

This happens if we fail retrieving reset GPIO with which we can reset
the modules.

(Note that this GPIO is different from reset button GPIO.)

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
board/CZ.NIC/turris_mox/turris_mox.c

index ff0ed28..7c5acfd 100644 (file)
@@ -617,7 +617,7 @@ int last_stage_init(void)
 
        /* configure modules */
        if (get_reset_gpio(&reset_gpio) < 0)
-               return 0;
+               goto handle_reset_btn;
 
        if (peridot > 0) {
                if (configure_peridots(&reset_gpio) < 0) {
@@ -654,6 +654,7 @@ int last_stage_init(void)
                }
        }
 
+handle_reset_btn:
        handle_reset_button();
 
        return 0;