| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | 
| Russell King | f8ce254 | 2006-01-07 16:15:52 +0000 | [diff] [blame] | 7 | #include <linux/clk.h> | 
 | 8 |  | 
| Tony Lindgren | af973d2 | 2005-07-10 19:58:06 +0100 | [diff] [blame] | 9 | #include <asm/mach-types.h> | 
| Russell King | 0a5709b | 2005-11-16 14:51:20 +0000 | [diff] [blame] | 10 | #include <asm/hardware.h> | 
| Tony Lindgren | 9ad5897 | 2005-11-10 14:26:53 +0000 | [diff] [blame] | 11 |  | 
 | 12 | #ifndef CONFIG_MACH_VOICEBLUE | 
 | 13 | #define voiceblue_reset()		do {} while (0) | 
 | 14 | #endif | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 |  | 
| Tony Lindgren | b824efa | 2006-04-02 17:46:20 +0100 | [diff] [blame] | 16 | extern void omap_prcm_arch_reset(char mode); | 
 | 17 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | static inline void arch_idle(void) | 
 | 19 | { | 
 | 20 | 	cpu_do_idle(); | 
 | 21 | } | 
 | 22 |  | 
| Tony Lindgren | 9ad5897 | 2005-11-10 14:26:53 +0000 | [diff] [blame] | 23 | static inline void omap1_arch_reset(char mode) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 24 | { | 
| Tony Lindgren | af973d2 | 2005-07-10 19:58:06 +0100 | [diff] [blame] | 25 | 	/* | 
 | 26 | 	 * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28 | 
 | 27 | 	 * "Global Software Reset Affects Traffic Controller Frequency". | 
 | 28 | 	 */ | 
 | 29 | 	if (cpu_is_omap5912()) { | 
 | 30 | 		omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4), | 
 | 31 | 				 DPLL_CTL); | 
 | 32 | 		omap_writew(0x8, ARM_RSTCT1); | 
 | 33 | 	} | 
| Tony Lindgren | 9ad5897 | 2005-11-10 14:26:53 +0000 | [diff] [blame] | 34 |  | 
| Tony Lindgren | af973d2 | 2005-07-10 19:58:06 +0100 | [diff] [blame] | 35 | 	if (machine_is_voiceblue()) | 
 | 36 | 		voiceblue_reset(); | 
 | 37 | 	else | 
| Tony Lindgren | af973d2 | 2005-07-10 19:58:06 +0100 | [diff] [blame] | 38 | 		omap_writew(1, ARM_RSTCT1); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 39 | } | 
 | 40 |  | 
| Tony Lindgren | 9ad5897 | 2005-11-10 14:26:53 +0000 | [diff] [blame] | 41 | static inline void arch_reset(char mode) | 
 | 42 | { | 
 | 43 | 	if (!cpu_is_omap24xx()) | 
 | 44 | 		omap1_arch_reset(mode); | 
 | 45 | 	else | 
| Tony Lindgren | b824efa | 2006-04-02 17:46:20 +0100 | [diff] [blame] | 46 | 		omap_prcm_arch_reset(mode); | 
| Tony Lindgren | 9ad5897 | 2005-11-10 14:26:53 +0000 | [diff] [blame] | 47 | } | 
 | 48 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 49 | #endif |