Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 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 | |
| 9 | #include <asm/mach-types.h> |
| 10 | #include <mach/hardware.h> |
| 11 | |
| 12 | #ifndef CONFIG_MACH_VOICEBLUE |
| 13 | #define voiceblue_reset() do {} while (0) |
| 14 | #endif |
| 15 | |
| 16 | extern void omap_prcm_arch_reset(char mode); |
| 17 | |
| 18 | static inline void arch_idle(void) |
| 19 | { |
| 20 | cpu_do_idle(); |
| 21 | } |
| 22 | |
| 23 | static inline void omap1_arch_reset(char mode) |
| 24 | { |
| 25 | /* |
| 26 | * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28 |
| 27 | * "Global Software Reset Affects Traffic Controller Frequency". |
| 28 | */ |
| 29 | if (cpu_is_omap5912()) { |
| 30 | omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4), |
| 31 | DPLL_CTL); |
| 32 | omap_writew(0x8, ARM_RSTCT1); |
| 33 | } |
| 34 | |
| 35 | if (machine_is_voiceblue()) |
| 36 | voiceblue_reset(); |
| 37 | else |
| 38 | omap_writew(1, ARM_RSTCT1); |
| 39 | } |
| 40 | |
| 41 | static inline void arch_reset(char mode) |
| 42 | { |
Syed Mohammed, Khasim | cc26b3b | 2008-10-09 17:51:41 +0300 | [diff] [blame] | 43 | if (!cpu_class_is_omap2()) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 44 | omap1_arch_reset(mode); |
| 45 | else |
| 46 | omap_prcm_arch_reset(mode); |
| 47 | } |
| 48 | |
| 49 | #endif |