Skip to content

Commit

Permalink
[PATCH] powerpc: Add support for Book-E timer config to generic_calib…
Browse files Browse the repository at this point in the history
…rate_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>
  • Loading branch information
Kumar Gala authored and Paul Mackerras committed Oct 26, 2005
1 parent ab590cc commit 0fd6f71
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions arch/powerpc/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 0fd6f71

Please sign in to comment.