#include <ambapp.h>
#endif
+#ifdef CONFIG_BITBANGMII
+#include <miiphy.h>
+#endif
+
DECLARE_GLOBAL_DATA_PTR;
/* Debug options
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 *
************************************************************************
*/
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)
doc_init();
#endif
+#ifdef CONFIG_BITBANGMII
+ bb_miiphy_init();
+#endif
#if defined(CONFIG_CMD_NET)
#if defined(CONFIG_NET_MULTI)
WATCHDOG_RESET();