diff --git a/board/nm/nrhw20/board.c b/board/nm/nrhw20/board.c index 4ce59bb728..054591b30e 100644 --- a/board/nm/nrhw20/board.c +++ b/board/nm/nrhw20/board.c @@ -525,6 +525,9 @@ static void init_pcie_slot(void) mdelay(10); /* PCIe requires at least 1ms delay between power on and reset release */ gpio_set_value(NETBIRD_GPIO_RST_PCI, 0); /* Release reset */ + + /* TODO: Define state of W_DISABLE */ + } static void init_gsm(void) @@ -810,7 +813,7 @@ static void blink_led(void) set_status_led(0, 1); } -static int check_reset_button(void) +static void check_reset_button(void) { int counter = 0; @@ -833,13 +836,12 @@ static int check_reset_button(void) } } while (counter < 12000); - /* Don't do anything for duration < 2s */ - if (counter < 2000) - return 0; - - /* Do factory reset for duration between ~5s and ~15s */ - if (counter < 12000) + if (counter < 2000) { + /* Don't do anything for duration < 2s */ + } + else if (counter < 12000) { + /* Do factory reset for duration between 2s and 12s */ char new_bootargs[512]; char *bootargs = getenv("bootargs"); @@ -851,27 +853,19 @@ static int check_reset_button(void) strncat(new_bootargs, " factory-reset", sizeof(new_bootargs)); setenv("bootargs", new_bootargs); - - printf("bootargs = %s\n", new_bootargs); - - return 1; } - - /* Boot into recovery for duration > 15s */ else { - /* set consoledev to external port */ - /* setenv("consoledev", "ttyS1"); */ + /* Boot into recovery for duration > 12s */ printf("Booting recovery image...\n"); /* Set bootcmd to run recovery */ setenv("bootcmd", "run recovery"); - return 0; + /* set consoledev to external port */ + /* setenv("consoledev", "ttyS1"); */ } - - return 0; } #endif