summaryrefslogtreecommitdiff
path: root/cpu/ppc4xx/start.S
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2008-11-20 11:46:20 +0100
committerStefan Roese <sr@denx.de>2008-11-20 11:48:53 +0100
commit25fb4eaaeab3f8866020818f4729d990dcc91cf0 (patch)
treeb9d9c691919466ea7005444a919759231fe47c05 /cpu/ppc4xx/start.S
parent9b827cf1720acda2473afa516956eab6f7cca9a1 (diff)
ppc4xx: Clear all potentially pending exceptions in MCSR
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>
Diffstat (limited to 'cpu/ppc4xx/start.S')
-rw-r--r--cpu/ppc4xx/start.S4
1 files changed, 4 insertions, 0 deletions
diff --git a/cpu/ppc4xx/start.S b/cpu/ppc4xx/start.S
index 882ef219a5..84d7a2889f 100644
--- a/cpu/ppc4xx/start.S
+++ b/cpu/ppc4xx/start.S
@@ -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