reset.c 743 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (C) 2011-2012 Synopsys, Inc. (www.synopsys.com)
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #include <linux/kernel.h>
  9. #include <linux/printk.h>
  10. #include <linux/reboot.h>
  11. #include <linux/pm.h>
  12. void machine_halt(void)
  13. {
  14. /* Halt the processor */
  15. __asm__ __volatile__("flag 1\n");
  16. }
  17. void machine_restart(char *__unused)
  18. {
  19. /* Soft reset : jump to reset vector */
  20. pr_info("Put your restart handler here\n");
  21. machine_halt();
  22. }
  23. void machine_power_off(void)
  24. {
  25. /* FIXME :: power off ??? */
  26. machine_halt();
  27. }
  28. void (*pm_power_off) (void) = NULL;
  29. EXPORT_SYMBOL(pm_power_off);