[PATCH 04/19] arch/MPC5xxx: Simplify the calculation

Juergen Borleis jbe at pengutronix.de
Tue Oct 7 07:22:03 PDT 2014


Signed-off-by: Juergen Borleis <jbe at pengutronix.de>
---
 arch/ppc/mach-mpc5xxx/start.S | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/ppc/mach-mpc5xxx/start.S b/arch/ppc/mach-mpc5xxx/start.S
index 291f625..6a32718 100644
--- a/arch/ppc/mach-mpc5xxx/start.S
+++ b/arch/ppc/mach-mpc5xxx/start.S
@@ -66,6 +66,7 @@
 	 * Second stage loader entry. When entered here we assume that spr 311
 	 * is set to the current MBAR address.
 	 */
+_base:
 	mfspr	r4, MBAR
 	b setup_mbar
 	. = EXC_OFF_SYS_RESET
@@ -251,9 +252,8 @@ _continue_init:
 
 	bl	calc_source     /* Calculate Source Address             */
 calc_source:
-	mfspr	r4,  LR
-	subi	r4, r4, (calc_source - _start)
-	subi	r4, r4, 0x100
+	mflr	r4
+	subi	r4, r4, (calc_source - _base)
 
 	lis	r5, __init_size at h		/* Size         	*/
 	ori	r5, r5, __init_size at l
-- 
2.1.0




More information about the barebox mailing list