Signed-off-by: Juergen Borleis <[email protected]>
---
 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@h
-       ori     r4, r4, 0x80000000@l
+       lis     r4, DEFAULT_MBAR@h
+       ori     r4, r4, DEFAULT_MBAR@l
 
 setup_mbar:
        /* r4 == current MBAR */
        mfmsr   r5                      /* save msr contents            */
 
-       /* Switch MBAR to 0xf0000000 */
-       lis     r3, 0xf0000000@h
-       ori     r3, r3, 0xf0000000@l
+       /* Switch MBAR to its new destination */
+       lis     r3, CFG_MBAR@h
+       ori     r3, r3, CFG_MBAR@l
        mtspr   MBAR, r3
        rlwinm  r3, r3, 16, 16, 31
        stw     r3, 0(r4)
-- 
2.1.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to