system.h 882 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. *
  3. * arch/arm/mach-u300/include/mach/system.h
  4. *
  5. *
  6. * Copyright (C) 2007-2009 ST-Ericsson AB
  7. * License terms: GNU General Public License (GPL) version 2
  8. * System shutdown and reset functions.
  9. * Author: Linus Walleij <linus.walleij@stericsson.com>
  10. */
  11. #include <mach/hardware.h>
  12. #include <asm/io.h>
  13. #include <asm/hardware/vic.h>
  14. #include <asm/irq.h>
  15. /* Forward declare this function from the watchdog */
  16. void coh901327_watchdog_reset(void);
  17. static inline void arch_idle(void)
  18. {
  19. cpu_do_idle();
  20. }
  21. static void arch_reset(char mode, const char *cmd)
  22. {
  23. switch (mode) {
  24. case 's':
  25. case 'h':
  26. printk(KERN_CRIT "RESET: shutting down/rebooting system\n");
  27. /* Disable interrupts */
  28. local_irq_disable();
  29. #ifdef CONFIG_COH901327_WATCHDOG
  30. coh901327_watchdog_reset();
  31. #endif
  32. break;
  33. default:
  34. /* Do nothing */
  35. break;
  36. }
  37. /* Wait for system do die/reset. */
  38. while (1);
  39. }