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