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