system.h 1005 B

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