reset.c 769 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Reset a DECstation machine.
  3. *
  4. * Copyright (C) 199x the Anonymous
  5. * Copyright (C) 2001, 2002, 2003 Maciej W. Rozycki
  6. */
  7. #include <linux/interrupt.h>
  8. #include <linux/linkage.h>
  9. #include <asm/addrspace.h>
  10. #include <asm/ptrace.h>
  11. typedef void ATTRIB_NORET (* noret_func_t)(void);
  12. static inline void ATTRIB_NORET back_to_prom(void)
  13. {
  14. noret_func_t func = (void *) KSEG1ADDR(0x1fc00000);
  15. func();
  16. }
  17. void ATTRIB_NORET dec_machine_restart(char *command)
  18. {
  19. back_to_prom();
  20. }
  21. void ATTRIB_NORET dec_machine_halt(void)
  22. {
  23. back_to_prom();
  24. }
  25. void ATTRIB_NORET dec_machine_power_off(void)
  26. {
  27. /* DECstations don't have a software power switch */
  28. back_to_prom();
  29. }
  30. irqreturn_t dec_intr_halt(int irq, void *dev_id, struct pt_regs *regs)
  31. {
  32. dec_machine_halt();
  33. }