Patchwork [U-Boot,3/4] microblaze: Disable all cpu features before reset

login
register
mail settings
Submitter Michal Simek
Date April 22, 2013, 2:41 p.m.
Message ID <e78a4ac76c527cfeb61a9c499f0229a1567b2509.1366641621.git.michal.simek@xilinx.com>
Download mbox | patch
Permalink /patch/238548/
State Superseded
Delegated to: Michal Simek
Headers show

Comments

Michal Simek - April 22, 2013, 2:41 p.m.
From: Michal Simek <monstr@monstr.eu>

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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--
1.8.2.1

Patch

diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c
index 8ba99f9..1af0b86 100644
--- a/board/xilinx/microblaze-generic/microblaze-generic.c
+++ b/board/xilinx/microblaze-generic/microblaze-generic.c
@@ -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;
 }