system.h 1023 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copied from arch/arm/mach-sa1100/include/mach/system.h
  3. * Copyright (c) 1999 Nicolas Pitre <nico@fluxnic.net>
  4. */
  5. #ifndef __ASM_ARCH_SYSTEM_H
  6. #define __ASM_ARCH_SYSTEM_H
  7. #include <linux/clk.h>
  8. #include <asm/mach-types.h>
  9. #include <mach/hardware.h>
  10. #include <mach/prcm.h>
  11. #ifndef CONFIG_MACH_VOICEBLUE
  12. #define voiceblue_reset() do {} while (0)
  13. #else
  14. extern void voiceblue_reset(void);
  15. #endif
  16. static inline void arch_idle(void)
  17. {
  18. cpu_do_idle();
  19. }
  20. static inline void omap1_arch_reset(char mode)
  21. {
  22. /*
  23. * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
  24. * "Global Software Reset Affects Traffic Controller Frequency".
  25. */
  26. if (cpu_is_omap5912()) {
  27. omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4),
  28. DPLL_CTL);
  29. omap_writew(0x8, ARM_RSTCT1);
  30. }
  31. if (machine_is_voiceblue())
  32. voiceblue_reset();
  33. else
  34. omap_writew(1, ARM_RSTCT1);
  35. }
  36. static inline void arch_reset(char mode, const char *cmd)
  37. {
  38. if (!cpu_class_is_omap2())
  39. omap1_arch_reset(mode);
  40. else
  41. omap_prcm_arch_reset(mode);
  42. }
  43. #endif