mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-22 20:31:14 +00:00
fusee: do PMC reboots, not CAR reboots.
This commit is contained in:
parent
be5b58d033
commit
33b7e227d4
4 changed files with 2 additions and 22 deletions
|
@ -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) {
|
__attribute__((noreturn)) void wait_for_button_and_reboot(void) {
|
||||||
uint32_t button;
|
uint32_t button;
|
||||||
while (true) {
|
while (true) {
|
||||||
button = btn_read();
|
button = btn_read();
|
||||||
if (button & BTN_POWER) {
|
if (button & BTN_POWER) {
|
||||||
car_reboot();
|
pmc_reboot(1 << 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,7 +121,6 @@ void hexdump(const void* data, size_t size, uintptr_t addrbase);
|
||||||
|
|
||||||
__attribute__((noreturn)) void watchdog_reboot(void);
|
__attribute__((noreturn)) void watchdog_reboot(void);
|
||||||
__attribute__((noreturn)) void pmc_reboot(uint32_t scratch0);
|
__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 wait_for_button_and_reboot(void);
|
||||||
|
|
||||||
__attribute__((noreturn)) void generic_panic(void);
|
__attribute__((noreturn)) void generic_panic(void);
|
||||||
|
|
|
@ -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) {
|
__attribute__((noreturn)) void wait_for_button_and_reboot(void) {
|
||||||
uint32_t button;
|
uint32_t button;
|
||||||
while (true) {
|
while (true) {
|
||||||
button = btn_read();
|
button = btn_read();
|
||||||
if (button & BTN_POWER) {
|
if (button & BTN_POWER) {
|
||||||
car_reboot();
|
pmc_reboot(1 << 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,7 +122,6 @@ void hexdump(const void* data, size_t size, uintptr_t addrbase);
|
||||||
|
|
||||||
__attribute__((noreturn)) void watchdog_reboot(void);
|
__attribute__((noreturn)) void watchdog_reboot(void);
|
||||||
__attribute__((noreturn)) void pmc_reboot(uint32_t scratch0);
|
__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 wait_for_button_and_reboot(void);
|
||||||
void wait_for_button(void);
|
void wait_for_button(void);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue