]> git.sur5r.net Git - u-boot/blobdiff - arch/x86/lib/init_helpers.c
x86: Make the upper bound on relocated symbols closed instead of open
[u-boot] / arch / x86 / lib / init_helpers.c
index 87c7263fcb5094824e141cf737a5deac507744d5..9fd87dfd2e0ecac9807417affce5879298faed6c 100644 (file)
@@ -28,6 +28,7 @@
 #include <net.h>
 #include <ide.h>
 #include <serial.h>
+#include <spi.h>
 #include <status_led.h>
 #include <asm/processor.h>
 #include <asm/u-boot-x86.h>
@@ -85,15 +86,16 @@ int calculate_relocation_address(void)
 
        /* Stack is at top of available memory */
        dest_addr = gd->ram_size;
-       gd->start_addr_sp = dest_addr;
 
-       /* U-Boot is below the stack */
-       dest_addr -= CONFIG_SYS_STACK_SIZE;
+       /* U-Boot is at the top */
        dest_addr -= (bss_end - text_start);
        dest_addr &= ~15;
        gd->relocaddr = dest_addr;
        gd->reloc_off = (dest_addr - text_start);
 
+       /* Stack is at the bottom, so it can grow down */
+       gd->start_addr_sp = dest_addr - CONFIG_SYS_MALLOC_LEN;
+
        return 0;
 }
 
@@ -160,3 +162,11 @@ int set_load_addr_r(void)
 
        return 0;
 }
+
+int init_func_spi(void)
+{
+       puts("SPI:   ");
+       spi_init();
+       puts("ready\n");
+       return 0;
+}