]> git.sur5r.net Git - u-boot/commitdiff
common/board_f: add setup of initial stack frame for MIPS
authorDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Sat, 15 Nov 2014 22:46:52 +0000 (23:46 +0100)
committerTom Rini <trini@ti.com>
Sun, 23 Nov 2014 11:49:03 +0000 (06:49 -0500)
The MIPS specific setup of the initial stack frame was not
ported to generic board_f.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
common/board_f.c

index b5bebc9dc862727b7aa2386f64691ace23475cc0..57e8a673bd1a056d0388c05d6d28d0994b70a48a 100644 (file)
@@ -579,7 +579,7 @@ static int reserve_stacks(void)
        gd->irq_sp = gd->start_addr_sp;
 # endif
 #else
-# ifdef CONFIG_PPC
+# if defined(CONFIG_PPC) || defined(CONFIG_MIPS)
        ulong *s;
 # endif
 
@@ -609,6 +609,12 @@ static int reserve_stacks(void)
        s = (ulong *) gd->start_addr_sp;
        *s = 0; /* Terminate back chain */
        *++s = 0; /* NULL return address */
+# elif defined(CONFIG_MIPS)
+       /* Clear initial stack frame */
+       s = (ulong *) gd->start_addr_sp;
+       *s-- = 0;
+       *s-- = 0;
+       gd->start_addr_sp = (ulong) s;
 # endif /* Architecture specific code */
 
        return 0;