X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-arm%2Farch-omap%2Fsystem.h;h=67970d1a2020b213a32d6b9c36f7bdc9ccb42014;hb=d8b3d7077d08311552643a220f21ce0d30130f59;hp=17a2c4825f074af6d9f075ad07013b4b143f1753;hpb=207e0a826fdee4bfe853681aef2175a739c11286;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..67970d1a2 100644 --- a/include/asm-arm/arch-omap/system.h +++ b/include/asm-arm/arch-omap/system.h @@ -5,16 +5,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