system.h 980 B

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