[PATCH] powerpc/time: When starting the decrementer don't zero the other bits in TCR

Laurentiu Tudor Laurentiu.Tudor at freescale.com
Thu Aug 25 22:19:55 EST 2011


Clearing the other TCR bits might break code that sets them (e.g. to setup
the watchdog or fixed interval timer) before start_cpu_decrementer() gets
called.

Signed-off-by: Laurentiu Tudor <Laurentiu.Tudor at freescale.com>
---
 arch/powerpc/kernel/time.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 03b29a6..e8b5cdc 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -721,7 +721,7 @@ void start_cpu_decrementer(void)
 	mtspr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_DIS | TSR_FIS);
 
 	/* Enable decrementer interrupt */
-	mtspr(SPRN_TCR, TCR_DIE);
+	mtspr(SPRN_TCR, mfspr(SPRN_TCR) | TCR_DIE);
 #endif /* defined(CONFIG_BOOKE) || defined(CONFIG_40x) */
 }
 
-- 
1.7.1




More information about the Linuxppc-dev mailing list