/* We can't really power off, but if we do the normal reset scheme, and indicate to bootcode.bin not to reboot, then most of the chip will be powered off */ static void bcm2708_power_off(void) { extern char bcm2708_reboot_mode; if(bcm2708_reboot_mode == 'q') { // NOOBS < v1.3 bcm2708_restart('p', ""); } else { /* partition 63 is special code for HALT the bootloader knows not to boot*/ reboot_part = 63; /* continue with normal reset mechanism */ bcm2708_restart(0, ""); } }
/* We can't really power off, but if we do the normal reset scheme, and indicate to bootcode.bin not to reboot, then most of the chip will be powered off */ static void bcm2708_power_off(void) { /* we set the watchdog hard reset bit here to distinguish this reset from the normal (full) reset. bootcode.bin will not reboot after a hard reset */ uint32_t pm_rsts = readl(IO_ADDRESS(PM_RSTS)); pm_rsts = PM_PASSWORD | (pm_rsts & PM_RSTC_WRCFG_CLR) | PM_RSTS_HADWRH_SET; writel(pm_rsts, IO_ADDRESS(PM_RSTS)); /* continue with normal reset mechanism */ bcm2708_restart(0, ""); }