[PATCH 09/19] arch/MPC5xxx: just use macros instead of anonymous digits

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


Signed-off-by: Juergen Borleis <jbe at pengutronix.de>
---
 arch/ppc/mach-mpc5xxx/include/mach/mpc5200.h |  1 +
 arch/ppc/mach-mpc5xxx/start.S                | 12 ++++++------
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/arch/ppc/mach-mpc5xxx/include/mach/mpc5200.h b/arch/ppc/mach-mpc5xxx/include/mach/mpc5200.h
index 35762a1..28dfa6e 100644
--- a/arch/ppc/mach-mpc5xxx/include/mach/mpc5200.h
+++ b/arch/ppc/mach-mpc5xxx/include/mach/mpc5200.h
@@ -37,6 +37,7 @@
 #define EXC_OFF_SYS_RESET	0x0100
 #define _START_OFFSET		EXC_OFF_SYS_RESET
 
+#define DEFAULT_MBAR 0x80000000
 #define CFG_MBAR 0xf0000000
 
 /* useful macros for manipulating CSx_START/STOP */
diff --git a/arch/ppc/mach-mpc5xxx/start.S b/arch/ppc/mach-mpc5xxx/start.S
index 8402345..810a5bb 100644
--- a/arch/ppc/mach-mpc5xxx/start.S
+++ b/arch/ppc/mach-mpc5xxx/start.S
@@ -75,18 +75,18 @@ _base:
 _start:
 	/*
 	 * Reset entry. When entered here we assume that MBAR is at reset default
-	 * 0x80000000.
+	 * DEFAULT_MBAR.
 	 */
-	lis	r4, 0x80000000 at h
-	ori	r4, r4, 0x80000000 at l
+	lis	r4, DEFAULT_MBAR at h
+	ori	r4, r4, DEFAULT_MBAR at l
 
 setup_mbar:
 	/* r4 == current MBAR */
 	mfmsr	r5			/* save msr contents		*/
 
-	/* Switch MBAR to 0xf0000000 */
-	lis	r3, 0xf0000000 at h
-	ori	r3, r3, 0xf0000000 at l
+	/* Switch MBAR to its new destination */
+	lis	r3, CFG_MBAR at h
+	ori	r3, r3, CFG_MBAR at l
 	mtspr	MBAR, r3
 	rlwinm	r3, r3, 16, 16, 31
 	stw	r3, 0(r4)
-- 
2.1.0




More information about the barebox mailing list