142a2478bSMichal Simek /* 242a2478bSMichal Simek * Copyright (C) 2009 Michal Simek <[email protected]> 342a2478bSMichal Simek * Copyright (C) 2009 PetaLogix 442a2478bSMichal Simek * 542a2478bSMichal Simek * This file is subject to the terms and conditions of the GNU General Public 642a2478bSMichal Simek * License. See the file "COPYING" in the main directory of this archive 742a2478bSMichal Simek * for more details. 842a2478bSMichal Simek */ 942a2478bSMichal Simek 1042a2478bSMichal Simek #include <linux/init.h> 11*7cca9b8bSLinus Walleij #include <linux/delay.h> 12*7cca9b8bSLinus Walleij #include <linux/reboot.h> 1342a2478bSMichal Simek machine_shutdown(void)1442a2478bSMichal Simekvoid machine_shutdown(void) 1542a2478bSMichal Simek { 16aaa5241eSMichal Simek pr_notice("Machine shutdown...\n"); 1742a2478bSMichal Simek while (1) 1842a2478bSMichal Simek ; 1942a2478bSMichal Simek } 2042a2478bSMichal Simek machine_halt(void)2142a2478bSMichal Simekvoid machine_halt(void) 2242a2478bSMichal Simek { 23aaa5241eSMichal Simek pr_notice("Machine halt...\n"); 2442a2478bSMichal Simek while (1) 2542a2478bSMichal Simek ; 2642a2478bSMichal Simek } 2742a2478bSMichal Simek machine_power_off(void)2842a2478bSMichal Simekvoid machine_power_off(void) 2942a2478bSMichal Simek { 30aaa5241eSMichal Simek pr_notice("Machine power off...\n"); 3142a2478bSMichal Simek while (1) 3242a2478bSMichal Simek ; 3342a2478bSMichal Simek } 34*7cca9b8bSLinus Walleij machine_restart(char * cmd)35*7cca9b8bSLinus Walleijvoid machine_restart(char *cmd) 36*7cca9b8bSLinus Walleij { 37*7cca9b8bSLinus Walleij do_kernel_restart(cmd); 38*7cca9b8bSLinus Walleij /* Give the restart hook 1 s to take us down */ 39*7cca9b8bSLinus Walleij mdelay(1000); 40*7cca9b8bSLinus Walleij pr_emerg("Reboot failed -- System halted\n"); 41*7cca9b8bSLinus Walleij while (1); 42*7cca9b8bSLinus Walleij } 43