Merge branch 'upstream'
[deliverable/linux.git] / include / asm-arm / arch-omap / system.h
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
10 #include <asm/mach-types.h>
11 #include <asm/hardware.h>
12
13 #ifndef CONFIG_MACH_VOICEBLUE
14 #define voiceblue_reset() do {} while (0)
15 #endif
16
17 extern void omap_prcm_arch_reset(char mode);
18
19 static inline void arch_idle(void)
20 {
21 cpu_do_idle();
22 }
23
24 static inline void omap1_arch_reset(char mode)
25 {
26 /*
27 * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
28 * "Global Software Reset Affects Traffic Controller Frequency".
29 */
30 if (cpu_is_omap5912()) {
31 omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4),
32 DPLL_CTL);
33 omap_writew(0x8, ARM_RSTCT1);
34 }
35
36 if (machine_is_voiceblue())
37 voiceblue_reset();
38 else
39 omap_writew(1, ARM_RSTCT1);
40 }
41
42 static inline void arch_reset(char mode)
43 {
44 if (!cpu_is_omap24xx())
45 omap1_arch_reset(mode);
46 else
47 omap_prcm_arch_reset(mode);
48 }
49
50 #endif
This page took 0.036047 seconds and 6 git commands to generate.