system.h 905 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * arch/arm/mach-w90x900/include/mach/system.h
  3. *
  4. * Copyright (c) 2008 Nuvoton technology corporation
  5. * All rights reserved.
  6. *
  7. * Wan ZongShun <mcuos.com@gmail.com>
  8. *
  9. * Based on arch/arm/mach-s3c2410/include/mach/system.h
  10. *
  11. * This program is free software; you can redistribute it and/or modify
  12. * it under the terms of the GNU General Public License as published by
  13. * the Free Software Foundation; either version 2 of the License, or
  14. * (at your option) any later version.
  15. *
  16. */
  17. #include <linux/io.h>
  18. #include <asm/proc-fns.h>
  19. #include <mach/map.h>
  20. #include <mach/regs-timer.h>
  21. #define WTCR (TMR_BA + 0x1C)
  22. #define WTCLK (1 << 10)
  23. #define WTE (1 << 7)
  24. #define WTRE (1 << 1)
  25. static void arch_idle(void)
  26. {
  27. }
  28. static void arch_reset(char mode, const char *cmd)
  29. {
  30. if (mode == 's') {
  31. /* Jump into ROM at address 0 */
  32. cpu_reset(0);
  33. } else {
  34. __raw_writel(WTE | WTRE | WTCLK, WTCR);
  35. }
  36. }