X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=include%2Fasm-arm%2Farch-omap%2Fsystem.h;h=ac2bfa433f06e9c160ccd404f98849f272e648d8;hb=refs%2Fheads%2Fvserver;hp=17a2c4825f074af6d9f075ad07013b4b143f1753;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/include/asm-arm/arch-omap/system.h b/include/asm-arm/arch-omap/system.h index 17a2c4825..ac2bfa433 100644 --- a/include/asm-arm/arch-omap/system.h +++ b/include/asm-arm/arch-omap/system.h @@ -4,17 +4,46 @@ */ #ifndef __ASM_ARCH_SYSTEM_H #define __ASM_ARCH_SYSTEM_H -#include -#include +#include + +#include +#include + +#ifndef CONFIG_MACH_VOICEBLUE +#define voiceblue_reset() do {} while (0) +#endif + +extern void omap_prcm_arch_reset(char mode); static inline void arch_idle(void) { cpu_do_idle(); } +static inline void omap1_arch_reset(char mode) +{ + /* + * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28 + * "Global Software Reset Affects Traffic Controller Frequency". + */ + if (cpu_is_omap5912()) { + omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4), + DPLL_CTL); + omap_writew(0x8, ARM_RSTCT1); + } + + if (machine_is_voiceblue()) + voiceblue_reset(); + else + omap_writew(1, ARM_RSTCT1); +} + static inline void arch_reset(char mode) { - omap_writew(1, ARM_RSTCT1); + if (!cpu_is_omap24xx()) + omap1_arch_reset(mode); + else + omap_prcm_arch_reset(mode); } #endif