microblaze: Disable all cpu features before reset
authorMichal Simek <monstr@monstr.eu>
Wed, 7 Nov 2012 14:27:39 +0000 (15:27 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 30 Apr 2013 09:22:42 +0000 (11:22 +0200)
Fix microblaze soft reset function and disable
all cpu features. Especially disable caches because
IRQs were off by disable_interrupts().

Reported-by: John Williams <john.williams@xilinx.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
board/xilinx/microblaze-generic/microblaze-generic.c

index 8ba99f9c50a93df6b3674198eb24514a746737af..1af0b86c75f44e13572a86e0dde7dea3825394a5 100644 (file)
@@ -40,7 +40,8 @@ int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 #endif
 
        puts ("Reseting board\n");
-       asm ("bra r0");
+       __asm__ __volatile__ (" mts rmsr, r0;" \
+                               "bra r0");
 
        return 0;
 }