cmd_recovery: remove gpio and leds
This commit is contained in:
parent
c000ad0f7a
commit
613625ad89
|
@ -21,19 +21,9 @@
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <command.h>
|
#include <command.h>
|
||||||
#include <status_led.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)
|
static int enable_netconsole(void)
|
||||||
{
|
{
|
||||||
|
@ -89,7 +79,7 @@ static int do_run_recovery(cmd_tbl_t *cmdtp, int flag, int argc, const char *arg
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
status_led_set(0, STATUS_LED_ON);
|
//status_led_set(0, STATUS_LED_ON);
|
||||||
printf("Starting the recovery process.\n");
|
printf("Starting the recovery process.\n");
|
||||||
|
|
||||||
/* Wait a bit and check if the reset button is still pressed */
|
/* 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");
|
printf("Forcing the recovery process.\n");
|
||||||
} else {
|
} else {
|
||||||
run_command("sleep 5", 0);
|
run_command("sleep 5", 0);
|
||||||
if (gpio_get_value(38) != 0) {
|
//if (gpio_get_value(38) != 0) {
|
||||||
printf("Recovery process aborted.\n");
|
printf("Recovery process aborted.\n");
|
||||||
run_command("dhcp", 0);
|
run_command("dhcp", 0);
|
||||||
enable_netconsole();
|
enable_netconsole();
|
||||||
BLINK_LED(4);
|
BLINK_LED(4);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
BLINK_LED(5);
|
BLINK_LED(5);
|
||||||
status_led_set(0, STATUS_LED_ON);
|
//status_led_set(0, STATUS_LED_ON);
|
||||||
|
|
||||||
rc = run_command("erase 0x9f040000 +0x10000", 0);
|
rc = run_command("erase 0x9f040000 +0x10000", 0);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
|
|
Loading…
Reference in New Issue