1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-05 19:51:45 +00:00

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);
}
}
}

View file

@ -121,7 +121,6 @@ void hexdump(const void* data, size_t size, uintptr_t addrbase);
__attribute__((noreturn)) void watchdog_reboot(void);
__attribute__((noreturn)) void pmc_reboot(uint32_t scratch0);
__attribute__((noreturn)) void car_reboot(void);
__attribute__((noreturn)) void wait_for_button_and_reboot(void);
__attribute__((noreturn)) void generic_panic(void);

View file

@ -58,21 +58,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);
}
}
}

View file

@ -122,7 +122,6 @@ void hexdump(const void* data, size_t size, uintptr_t addrbase);
__attribute__((noreturn)) void watchdog_reboot(void);
__attribute__((noreturn)) void pmc_reboot(uint32_t scratch0);
__attribute__((noreturn)) void car_reboot(void);
__attribute__((noreturn)) void wait_for_button_and_reboot(void);
void wait_for_button(void);