1 // SPDX-License-Identifier: GPL-2.0 2 /* 3 * Reset a DECstation machine. 4 * 5 * Copyright (C) 199x the Anonymous 6 * Copyright (C) 2001, 2002, 2003 Maciej W. Rozycki 7 */ 8 #include <linux/interrupt.h> 9 #include <linux/linkage.h> 10 11 #include <asm/addrspace.h> 12 13 #include <asm/dec/reset.h> 14 15 typedef void __noreturn (* noret_func_t)(void); 16 17 static inline void __noreturn back_to_prom(void) 18 { 19 noret_func_t func = (void *)CKSEG1ADDR(0x1fc00000); 20 21 func(); 22 } 23 24 void __noreturn dec_machine_restart(char *command) 25 { 26 back_to_prom(); 27 } 28 29 void __noreturn dec_machine_halt(void) 30 { 31 back_to_prom(); 32 } 33 34 void __noreturn dec_machine_power_off(void) 35 { 36 /* DECstations don't have a software power switch */ 37 back_to_prom(); 38 } 39 40 irqreturn_t dec_intr_halt(int irq, void *dev_id) 41 { 42 dec_machine_halt(); 43 } 44