]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mpc85xx: fix interrupt init to not affect watchdog
authorBoschung, Rainer <Rainer.Boschung@keymile.com>
Tue, 3 Jun 2014 07:05:12 +0000 (09:05 +0200)
committerYork Sun <yorksun@freescale.com>
Fri, 1 Aug 2014 21:17:44 +0000 (14:17 -0700)
TCR watchdog bit are overwritten when dec interrupt is enabled.
This has been fixed with this patch.

Signed-off-by: Rainer Boschung <rainer.boschung@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
arch/powerpc/cpu/mpc85xx/interrupts.c

index a36a4af9daa84d7819d5aa804f2f15595f20100d..daf46a9ba86d83279a3654e6cef28f0e9f6e98d4 100644 (file)
@@ -42,7 +42,7 @@ int interrupt_init_cpu(unsigned int *decrementer_count)
        *decrementer_count = get_tbclk() / CONFIG_SYS_HZ;
 
        /* PIE is same as DIE, dec interrupt enable */
-       mtspr(SPRN_TCR, TCR_PIE);
+       mtspr(SPRN_TCR, mfspr(SPRN_TCR) | TCR_PIE);
 
 #ifdef CONFIG_INTERRUPTS
        pic->iivpr1 = 0x810001; /* 50220 enable ecm interrupts */