fusee: do PMC reboots, not CAR reboots.

This commit is contained in:
Michael Scire 2018-11-30 06:34:20 -08:00
parent be5b58d033
commit 33b7e227d4
4 changed files with 2 additions and 22 deletions

View file

@ -59,21 +59,12 @@ __attribute__((noreturn)) void pmc_reboot(uint32_t scratch0) {
}
}
__attribute__((noreturn)) void car_reboot(void) {
/* Reset the processor. */
car_get_regs()->rst_dev_l |= 1<<2;
while (true) {
/* Wait for reboot. */
}
}
__attribute__((noreturn)) void wait_for_button_and_reboot(void) {
uint32_t button;
while (true) {
button = btn_read();
if (button & BTN_POWER) {
car_reboot();
pmc_reboot(1 << 1);
}
}
}