]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ppc4xx: Clear all potentially pending exceptions in MCSR
authorStefan Roese <sr@denx.de>
Thu, 20 Nov 2008 10:46:20 +0000 (11:46 +0100)
committerStefan Roese <sr@denx.de>
Thu, 20 Nov 2008 10:48:53 +0000 (11:48 +0100)
This is needed on Canyonlands which still has an exception pending
while running relocate_code(). This leads to a failure after trap_init()
is moved to the top of board_init_r().

Signed-off-by: Stefan Roese <sr@denx.de>
cpu/ppc4xx/start.S

index 882ef219a53359826a498c6b5f9aeea5eb3e7433..84d7a2889fb5d73281898f9c284476c93058dfc0 100644 (file)
@@ -1440,6 +1440,10 @@ relocate_code:
        dccci   0,0                     /* Invalidate data cache, now no longer our stack */
        sync
        isync
+
+       /* Clear all potential pending exceptions */
+       mfspr   r1,mcsr
+       mtspr   mcsr,r1
 #ifdef CONFIG_SYS_TLB_FOR_BOOT_FLASH
        addi    r1,r0,CONFIG_SYS_TLB_FOR_BOOT_FLASH     /* Use defined TLB */
 #else