Commit 0fd6f717 authored by Kumar Gala's avatar Kumar Gala Committed by Paul Mackerras

[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: default avatarKumar K. Gala <kumar.gala@freescale.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent ab590ccb
...@@ -610,6 +610,17 @@ void __init generic_calibrate_decr(void) ...@@ -610,6 +610,17 @@ void __init generic_calibrate_decr(void)
ppc_proc_freq = *fp; 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) if (!node_found)
printk(KERN_ERR "WARNING: Estimating processor frequency " printk(KERN_ERR "WARNING: Estimating processor frequency "
"(not found)\n"); "(not found)\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment