From 3cead632d722916b557a18e7c023d67b87a92eaf Mon Sep 17 00:00:00 2001
From: Dmytro Milinevskyy <milinevskyy@gmail.com>
Date: Sat, 29 Sep 2012 12:48:23 +0300
Subject: [PATCH] [mips][qemu] correctly compute start board_init_r address
 after relocation

---
 arch/mips/cpu/mips32/start.S | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/mips/cpu/mips32/start.S b/arch/mips/cpu/mips32/start.S
index 9c1b2f7..574b5b0 100644
--- a/arch/mips/cpu/mips32/start.S
+++ b/arch/mips/cpu/mips32/start.S
@@ -372,6 +372,9 @@ in_ram:
 
 	move	a0, s0			# a0 <-- gd
 	la	t9, board_init_r
+	li	t0, CONFIG_SYS_MONITOR_BASE
+	subu	t9, t9, t0
+	addu	t9, t9, s2
 	jr	t9
 	 move	a1, s2
 
-- 
1.7.12

