]> git.sur5r.net Git - u-boot/blobdiff - board/purple/purple.c
Merge with git+ssh://sr@pollux.denx.org/home/sr/git/u-boot/denx/.git
[u-boot] / board / purple / purple.c
index dfd014b53b5b10961165fe823726f994d35e79c6..4c3e5b44b5303ed161d30fe90a885658e5755f2d 100644 (file)
@@ -35,7 +35,7 @@
        __asm__ __volatile__("                  \
                .set noreorder;                 \
                .set mips3;                     \
-                cache %1, (%0);                        \
+               cache %1, (%0);                 \
                .set mips0;                     \
                .set reorder"                   \
                :                               \
@@ -182,7 +182,7 @@ static void copydwords (ulong *source, ulong *destination, ulong nlongs)
                *(ulong *)0xbf0081f8 = temp1 + temp;
                *destination++ = temp;
 
-       } 
+       }
 }
 
 /*******************************************************************************
@@ -214,8 +214,8 @@ static void programLoad(void)
        src = (ulong *)(TEXT_BASE + 0x428);
        dst = (ulong *)0xbf0081d0;
 
-       absEntry = (FUNCPTR)(TEXT_BASE + 0x400);   
-       absEntry(src,dst,0x6);          
+       absEntry = (FUNCPTR)(TEXT_BASE + 0x400);
+       absEntry(src,dst,0x6);
 
        src = (ulong *)((ulong)copydwords & 0xfffffff8);
        dst = (ulong *)0xbf008000;
@@ -232,6 +232,7 @@ static void programLoad(void)
 */
 void copy_code (ulong dest_addr)
 {
+       extern long uboot_end_data;
        unsigned long start;
        unsigned long end;
 
@@ -243,7 +244,7 @@ void copy_code (ulong dest_addr)
         */
        copyLongs((ulong *)CFG_MONITOR_BASE,
                  (ulong *)dest_addr,
-                 (CFG_MONITOR_LEN + 3) / 4);
+                 ((ulong)&uboot_end_data - CFG_MONITOR_BASE + 3) / 4);
 
 
        /* flush caches