1 // SPDX-License-Identifier: GPL-2.0-only 2 /* 3 * Copyright (C) 2012 Regents of the University of California 4 */ 5 6 #include <linux/reboot.h> 7 #include <asm/sbi.h> 8 9 static void default_power_off(void) 10 { 11 sbi_shutdown(); 12 while (1); 13 } 14 15 void (*pm_power_off)(void) = default_power_off; 16 17 void machine_restart(char *cmd) 18 { 19 do_kernel_restart(cmd); 20 while (1); 21 } 22 23 void machine_halt(void) 24 { 25 pm_power_off(); 26 } 27 28 void machine_power_off(void) 29 { 30 pm_power_off(); 31 } 32