2 * Copied from linux/include/asm-arm/arch-sa1100/system.h
3 * Copyright (c) 1999 Nicolas Pitre <nico@cam.org>
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/clock.h>
10 #include <asm/hardware.h>
11 #include <asm/arch/prcm.h>
13 #ifndef CONFIG_MACH_VOICEBLUE
14 #define voiceblue_reset() do {} while (0)
17 static inline void arch_idle(void)
22 static inline void omap1_arch_reset(char mode
)
25 * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
26 * "Global Software Reset Affects Traffic Controller Frequency".
28 if (cpu_is_omap5912()) {
29 omap_writew(omap_readw(DPLL_CTL
) & ~(1 << 4),
31 omap_writew(0x8, ARM_RSTCT1
);
34 if (machine_is_voiceblue())
37 omap_writew(1, ARM_RSTCT1
);
40 static inline void omap2_arch_reset(char mode
)
43 struct clk
*vclk
, *sclk
;
45 vclk
= clk_get(NULL
, "virt_prcm_set");
46 sclk
= clk_get(NULL
, "sys_ck");
47 rate
= clk_get_rate(sclk
);
48 clk_set_rate(vclk
, rate
); /* go to bypass for OMAP limitation */
52 static inline void arch_reset(char mode
)
54 if (!cpu_is_omap24xx())
55 omap1_arch_reset(mode
);
57 omap2_arch_reset(mode
);