]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/powerpc/cpu/mpc86xx/start.S
Merge branch 'master' of git://git.denx.de/u-boot-samsung
[karo-tx-uboot.git] / arch / powerpc / cpu / mpc86xx / start.S
index c499db48fd10c244532d2776f1bbbbd01c8eb392..4c29de61a24198dcc64bc8332fdfede210025e00 100644 (file)
@@ -30,6 +30,7 @@
  *  board_init lies at a quite high address and when the cpu has
  *  jumped there, everything is ok.
  */
+#include <asm-offsets.h>
 #include <config.h>
 #include <mpc86xx.h>
 #include <timestamp.h>
@@ -727,10 +728,12 @@ in_ram:
        beq     4f
 3:     lwzu    r4,4(r3)
        lwzux   r0,r4,r11
+       cmpwi   r0,0
        add     r0,r0,r11
-       stw     r10,0(r3)
+       stw     r4,0(r3)
+       beq-    5f
        stw     r0,0(r4)
-       bdnz    3b
+5:     bdnz    3b
 4:
 /* clear_bss: */
        /*
@@ -868,7 +871,7 @@ lock_ram_in_cache:
         */
        lis     r3, (CONFIG_SYS_INIT_RAM_ADDR & ~31)@h
        ori     r3, r3, (CONFIG_SYS_INIT_RAM_ADDR & ~31)@l
-       li      r4, ((CONFIG_SYS_INIT_RAM_END & ~31) + \
+       li      r4, ((CONFIG_SYS_INIT_RAM_SIZE & ~31) + \
                     (CONFIG_SYS_INIT_RAM_ADDR & 31) + 31) / 32
        mtctr   r4
 1:
@@ -903,7 +906,7 @@ unlock_ram_in_cache:
        /* invalidate the INIT_RAM section */
        lis     r3, (CONFIG_SYS_INIT_RAM_ADDR & ~31)@h
        ori     r3, r3, (CONFIG_SYS_INIT_RAM_ADDR & ~31)@l
-       li      r4, ((CONFIG_SYS_INIT_RAM_END & ~31) + \
+       li      r4, ((CONFIG_SYS_INIT_RAM_SIZE & ~31) + \
                     (CONFIG_SYS_INIT_RAM_ADDR & 31) + 31) / 32
        mtctr   r4
 1:     icbi    r0, r3