summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorKumar Gala <galak@freescale.com>2005-10-25 23:02:59 -0500
committerPaul Mackerras <paulus@samba.org>2005-10-26 15:55:46 +1000
commit0fd6f717948083d480f38e97f62cc116faf0e534 (patch)
treef8747c6d7536e5bb883ef80d92d12d00556e22f3 /arch
parentab590ccb428f874bb8f9cec1265cc1f9cb38b601 (diff)
[PATCH] powerpc: Add support for Book-E timer config to generic_calibrate_decr
We need to initialize some control SPRS for timers on Book-E before we start taking decrementer interrupts. Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-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 82f2cabb4f47..9f264c2f02c3 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -610,6 +610,17 @@ void __init generic_calibrate_decr(void)
ppc_proc_freq = *fp;
}
}
+#ifdef CONFIG_BOOKE
+ /* Set the time base to zero */
+ mtspr(SPRN_TBWL, 0);
+ mtspr(SPRN_TBWU, 0);
+
+ /* Clear any pending timer interrupts */
+ mtspr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_DIS | TSR_FIS);
+
+ /* Enable decrementer interrupt */
+ mtspr(SPRN_TCR, TCR_DIE);
+#endif
if (!node_found)
printk(KERN_ERR "WARNING: Estimating processor frequency "
"(not found)\n");