]> git.sur5r.net Git - u-boot/blobdiff - lib_sparc/board.c
push LOAD_ADDR out to arch mk files
[u-boot] / lib_sparc / board.c
index d40834b7b02cfb5094664bff804acaaeb584c0a7..6aadb56f63c1fa1bbd39e7a54957528d9e7ba511 100644 (file)
@@ -74,43 +74,6 @@ static char *failed = "*** failed ***\n";
 
 ulong monitor_flash_len;
 
-/*
- * Begin and End of memory area for malloc(), and current "brk"
- */
-static ulong mem_malloc_start = 0;
-static ulong mem_malloc_end = 0;
-static ulong mem_malloc_brk = 0;
-
-/************************************************************************
- * Utilities                                                           *
- ************************************************************************
- */
-
-/*
- * The Malloc area is immediately below the monitor copy in RAM
- */
-static void mem_malloc_init(void)
-{
-       mem_malloc_start = CONFIG_SYS_MALLOC_BASE;
-       mem_malloc_end = CONFIG_SYS_MALLOC_END;
-       mem_malloc_brk = mem_malloc_start;
-       memset((void *)mem_malloc_start, 0, mem_malloc_end - mem_malloc_start);
-}
-
-void *sbrk(ptrdiff_t increment)
-{
-       ulong old = mem_malloc_brk;
-       ulong new = old + increment;
-
-       if ((new < mem_malloc_start) || (new > mem_malloc_end)) {
-               return (NULL);
-       }
-       mem_malloc_brk = new;
-       return ((void *)old);
-}
-
-/***********************************************************************/
-
 /************************************************************************
  * Init Utilities                                                      *
  ************************************************************************
@@ -331,8 +294,9 @@ void board_init_f(ulong bootflag)
         */
        interrupt_init();
 
-       /* initialize malloc() area */
-       mem_malloc_init();
+       /* The Malloc area is immediately below the monitor copy in RAM */
+       mem_malloc_init(CONFIG_SYS_MALLOC_BASE,
+                       CONFIG_SYS_MALLOC_END - CONFIG_SYS_MALLOC_BASE);
        malloc_bin_reloc();
 
 #if !defined(CONFIG_SYS_NO_FLASH)