diff --git a/u-boot/common/cmd_recovery.c b/u-boot/common/cmd_recovery.c index 108a86b4f3..4456cf8a0e 100644 --- a/u-boot/common/cmd_recovery.c +++ b/u-boot/common/cmd_recovery.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012 sysmocom s.f.m.c. GmbH + * Copyright (C) 2012, 2013 sysmocom s.f.m.c. GmbH * Author: Holger Hans Peter Freyther * This program is free software; you can redistribute it and/or modify @@ -93,13 +93,17 @@ static int do_run_recovery(cmd_tbl_t *cmdtp, int flag, int argc, const char *arg printf("Starting the recovery process.\n"); /* Wait a bit and check if the reset button is still pressed */ - run_command("sleep 5", 0); - if (gpio_get_value(38) != 0) { - printf("Recovery process aborted.\n"); - run_command("dhcp", 0); - enable_netconsole(); - BLINK_LED(4); - return 0; + if (argc == 2 && strcmp(argv[1], "force") == 0) { + printf("Forcing the recovery process.\n"); + } else { + run_command("sleep 5", 0); + if (gpio_get_value(38) != 0) { + printf("Recovery process aborted.\n"); + run_command("dhcp", 0); + enable_netconsole(); + BLINK_LED(4); + return 0; + } } BLINK_LED(5); @@ -135,5 +139,6 @@ static int do_run_recovery(cmd_tbl_t *cmdtp, int flag, int argc, const char *arg U_BOOT_CMD( run_recovery, CONFIG_SYS_MAXARGS, 1, do_run_recovery, - "Run the sysmocom sysmoBTS recovery process", NULL + "Run the sysmocom sysmoBTS recovery process", + "[force]" );