X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=lib_blackfin%2Fboard.c;h=6cade7d1102e2d968ab3148732ee33f5ea934e6f;hb=a5dd4dc64fe68e549c5ffcf6a048281b5ba94752;hp=5b9efde7a23cc030589a63aea065bc19482432bf;hpb=f541e1d6d99c22bbd4bc8c84fdb02baad0277847;p=u-boot diff --git a/lib_blackfin/board.c b/lib_blackfin/board.c index 5b9efde7a2..6cade7d110 100644 --- a/lib_blackfin/board.c +++ b/lib_blackfin/board.c @@ -26,6 +26,10 @@ #include /* cannot even include nand.h if it isnt configured */ #endif +#ifdef CONFIG_BITBANGMII +#include +#endif + #if defined(CONFIG_POST) #include int post_flag; @@ -44,29 +48,6 @@ static inline void serial_early_puts(const char *s) #endif } -static void *mem_malloc_start, *mem_malloc_end, *mem_malloc_brk; - -static void mem_malloc_init(void) -{ - mem_malloc_start = (void *)CONFIG_SYS_MALLOC_BASE; - mem_malloc_end = (void *)(CONFIG_SYS_MALLOC_BASE + CONFIG_SYS_MALLOC_LEN); - mem_malloc_brk = mem_malloc_start; - memset(mem_malloc_start, 0, mem_malloc_end - mem_malloc_start); -} - -void *sbrk(ptrdiff_t increment) -{ - void *old = mem_malloc_brk; - void *new = old + increment; - - if (new < mem_malloc_start || new > mem_malloc_end) - return NULL; - - mem_malloc_brk = new; - - return old; -} - static int display_banner(void) { printf("\n\n%s\n\n", version_string); @@ -293,8 +274,10 @@ void board_init_f(ulong bootflag) static void board_net_init_r(bd_t *bd) { +#ifdef CONFIG_BITBANGMII + bb_miiphy_init(); +#endif #ifdef CONFIG_CMD_NET - uchar enetaddr[6]; char *s; if ((s = getenv("bootfile")) != NULL) @@ -304,15 +287,11 @@ static void board_net_init_r(bd_t *bd) printf("Net: "); eth_initialize(gd->bd); - - eth_getenv_enetaddr("ethaddr", enetaddr); - printf("MAC: %pM\n", enetaddr); #endif } void board_init_r(gd_t * id, ulong dest_addr) { - extern void malloc_bin_reloc(void); char *s; bd_t *bd; gd = id; @@ -325,8 +304,7 @@ void board_init_r(gd_t * id, ulong dest_addr) #endif /* initialize malloc() area */ - mem_malloc_init(); - malloc_bin_reloc(); + mem_malloc_init(CONFIG_SYS_MALLOC_BASE, CONFIG_SYS_MALLOC_LEN); #if !defined(CONFIG_SYS_NO_FLASH) /* Initialize the flash and protect u-boot by default */