]> git.sur5r.net Git - u-boot/blobdiff - lib_sparc/board.c
smc911x: fix typo in smc911x_handle_mac_address name
[u-boot] / lib_sparc / board.c
index d40834b7b02cfb5094664bff804acaaeb584c0a7..11eea603c11f131a039fb2781eaf7ea44ab9ca68 100644 (file)
 #include <ambapp.h>
 #endif
 
+#ifdef CONFIG_BITBANGMII
+#include <miiphy.h>
+#endif
+
 DECLARE_GLOBAL_DATA_PTR;
 
 /* Debug options
@@ -74,43 +78,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 +298,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)
@@ -441,6 +409,9 @@ void board_init_f(ulong bootflag)
        doc_init();
 #endif
 
+#ifdef CONFIG_BITBANGMII
+       bb_miiphy_init();
+#endif
 #if defined(CONFIG_CMD_NET)
 #if defined(CONFIG_NET_MULTI)
        WATCHDOG_RESET();