summaryrefslogtreecommitdiffstats
path: root/pk/ppe42/ppe42_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'pk/ppe42/ppe42_init.c')
-rw-r--r--pk/ppe42/ppe42_init.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/pk/ppe42/ppe42_init.c b/pk/ppe42/ppe42_init.c
index 2e4a2ad2..0beea37d 100644
--- a/pk/ppe42/ppe42_init.c
+++ b/pk/ppe42/ppe42_init.c
@@ -50,15 +50,16 @@ __ppe42_system_setup()
*/
#endif /*STATIC_IRQ_TABLE*/
- // Set the DEC to decrement on every cycle and enable the DEC interrupt. Clear the status
- // of all timers for good measure.
-
- //andc_spr(SPRN_TCR, TCR_DS);
- //or_spr(SPRN_TCR, TCR_DIE);
-
- //Use dec_timer signal for decrementer
- or_spr(SPRN_TCR, TCR_DIE | TCR_DS);
- or_spr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_DIS | TSR_FIS);
+ //Clear all status bits in the TSR
+ mtspr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_DIS | TSR_FIS);
+
+#ifndef APPCFG_USE_DEC_FOR_TIMEBASE
+ //Enable the DEC interrupt and configure it to use the external dec_timer signal
+ mtspr(SPRN_TCR, TCR_DIE | TCR_DS);
+#else
+ //Enable the DEC interrupt and configure it to use the internal clock signal
+ mtspr(SPRN_TCR, TCR_DIE);
+#endif /* APPCFG_USE_DEC_FOR_TIMEBASE */
#if PK_TIMER_SUPPORT
#if PK_TRACE_SUPPORT
OpenPOWER on IntegriCloud