diff options
author | Kumar Gala <galak@freescale.com> | 2005-10-26 00:02:59 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-10-26 01:55:46 -0400 |
commit | 0fd6f717948083d480f38e97f62cc116faf0e534 (patch) | |
tree | f8747c6d7536e5bb883ef80d92d12d00556e22f3 /arch/powerpc/kernel | |
parent | ab590ccb428f874bb8f9cec1265cc1f9cb38b601 (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/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/time.c | 11 |
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) | |||
610 | ppc_proc_freq = *fp; | 610 | ppc_proc_freq = *fp; |
611 | } | 611 | } |
612 | } | 612 | } |
613 | #ifdef CONFIG_BOOKE | ||
614 | /* Set the time base to zero */ | ||
615 | mtspr(SPRN_TBWL, 0); | ||
616 | mtspr(SPRN_TBWU, 0); | ||
617 | |||
618 | /* Clear any pending timer interrupts */ | ||
619 | mtspr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_DIS | TSR_FIS); | ||
620 | |||
621 | /* Enable decrementer interrupt */ | ||
622 | mtspr(SPRN_TCR, TCR_DIE); | ||
623 | #endif | ||
613 | if (!node_found) | 624 | if (!node_found) |
614 | printk(KERN_ERR "WARNING: Estimating processor frequency " | 625 | printk(KERN_ERR "WARNING: Estimating processor frequency " |
615 | "(not found)\n"); | 626 | "(not found)\n"); |