[CPUFREQ] cpufreq_notify_transition cleanup.
[linux/fpc-iii.git] / include / asm-arm / arch-omap / system.h
blob6724a81bd10bbecd841851e47ac9d5d899d4aa84
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>
10 #include <asm/mach-types.h>
11 #include <asm/hardware.h>
12 #include <asm/arch/prcm.h>
14 #ifndef CONFIG_MACH_VOICEBLUE
15 #define voiceblue_reset() do {} while (0)
16 #endif
18 static inline void arch_idle(void)
20 cpu_do_idle();
23 static inline void omap1_arch_reset(char mode)
26 * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
27 * "Global Software Reset Affects Traffic Controller Frequency".
29 if (cpu_is_omap5912()) {
30 omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4),
31 DPLL_CTL);
32 omap_writew(0x8, ARM_RSTCT1);
35 if (machine_is_voiceblue())
36 voiceblue_reset();
37 else
38 omap_writew(1, ARM_RSTCT1);
41 static inline void omap2_arch_reset(char mode)
43 u32 rate;
44 struct clk *vclk, *sclk;
46 vclk = clk_get(NULL, "virt_prcm_set");
47 sclk = clk_get(NULL, "sys_ck");
48 rate = clk_get_rate(sclk);
49 clk_set_rate(vclk, rate); /* go to bypass for OMAP limitation */
50 RM_RSTCTRL_WKUP |= 2;
53 static inline void arch_reset(char mode)
55 if (!cpu_is_omap24xx())
56 omap1_arch_reset(mode);
57 else
58 omap2_arch_reset(mode);
61 #endif