summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/time.c')
-rw-r--r--arch/powerpc/kernel/time.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 5fc29ad..58a41cf5 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -489,6 +489,9 @@ void timer_interrupt(struct pt_regs * regs)
struct clock_event_device *evt = &__get_cpu_var(decrementers);
u64 now;
+#ifdef CONFIG_FSL_ERRATUM_A_006184
+ mtspr(SPRN_TSR, TSR_ENW);
+#endif
/* Ensure a positive value is written to the decrementer, or else
* some CPUs will continue to take decrementer exceptions.
*/
@@ -639,7 +642,15 @@ void start_cpu_decrementer(void)
mtspr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_DIS | TSR_FIS);
/* Enable decrementer interrupt */
+#ifdef CONFIG_FSL_ERRATUM_A_006184
+#define WDTP(x) ((((x)&0x3)<<30)|(((x)&0x3c)<<15))
+ {
+ u32 period = WDTP(CONFIG_FSL_ERRATUM_A_006184_PERIOD);
+ mtspr(SPRN_TCR, TCR_DIE | TCR_WIE | period);
+ }
+#else
mtspr(SPRN_TCR, TCR_DIE);
+#endif
#endif /* defined(CONFIG_BOOKE) || defined(CONFIG_40x) */
}