Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NVRAM_RESET_GPIO_WAIT 5000
- int
- BCMINITFN(nvram_reset)(void *si)
- {
- int gpio;
- uint msec;
- si_t * sih = (si_t *)si;
- if ((gpio = nvram_resetgpio_init((void *)sih)) < 0)
- return FALSE;
- /* GPIO reset is asserted low */
- for (msec = 0; msec < NVRAM_RESET_GPIO_WAIT; msec++) {
- if (si_gpioin(sih) & ((uint32) 1 << gpio))
- return FALSE;
- OSL_DELAY(1000);
- }
- nvram_do_reset = TRUE;
- return TRUE;
- }
- if (nvram_reset((void *)sih) > 0)
- restore_defaults = 1;
- printf("Committing NVRAM...");
- nvram_commit();
- printf("done\n");
- if (restore_defaults) {
- printf("Waiting for reset button release...");
- reset_release_wait();
- printf("done\n");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement