cmd_recovery: remove gpio and leds
This commit is contained in:
parent
c000ad0f7a
commit
613625ad89
|
@ -21,20 +21,10 @@
|
|||
#include <common.h>
|
||||
#include <command.h>
|
||||
#include <status_led.h>
|
||||
#include <asm-generic/gpio.h>
|
||||
|
||||
#include <asm/gpio.h>
|
||||
#define BLINK_LED
|
||||
|
||||
#define BLINK_LED(LEN) \
|
||||
do { \
|
||||
int i; \
|
||||
for (i = 0; i < LEN; ++i) { \
|
||||
status_led_set(0, STATUS_LED_OFF); \
|
||||
udelay(900); \
|
||||
status_led_set(0, STATUS_LED_ON); \
|
||||
} \
|
||||
status_led_set(0, STATUS_LED_OFF); \
|
||||
} while(0);
|
||||
|
||||
static int enable_netconsole(void)
|
||||
{
|
||||
printf("Enabling the network console.\n");
|
||||
|
@ -89,7 +79,7 @@ static int do_run_recovery(cmd_tbl_t *cmdtp, int flag, int argc, const char *arg
|
|||
{
|
||||
int rc;
|
||||
|
||||
status_led_set(0, STATUS_LED_ON);
|
||||
//status_led_set(0, STATUS_LED_ON);
|
||||
printf("Starting the recovery process.\n");
|
||||
|
||||
/* Wait a bit and check if the reset button is still pressed */
|
||||
|
@ -97,17 +87,17 @@ static int do_run_recovery(cmd_tbl_t *cmdtp, int flag, int argc, const char *arg
|
|||
printf("Forcing the recovery process.\n");
|
||||
} else {
|
||||
run_command("sleep 5", 0);
|
||||
if (gpio_get_value(38) != 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);
|
||||
status_led_set(0, STATUS_LED_ON);
|
||||
//status_led_set(0, STATUS_LED_ON);
|
||||
|
||||
rc = run_command("erase 0x9f040000 +0x10000", 0);
|
||||
if (rc < 0)
|
||||
|
|
Loading…
Reference in New Issue