From 310cecb8ccdbc8a9be580e75b2fd362179d78535 Mon Sep 17 00:00:00 2001 From: Luigi 'Comio' Mantellini Date: Sat, 10 Oct 2009 12:42:21 +0200 Subject: [PATCH] Add bb_miiphy_init call before any ethernet bring-up code. Signed-off-by: Luigi 'Comio' Mantellini Signed-off-by: Ben Warren --- lib_arm/board.c | 7 +++++++ lib_avr32/board.c | 7 +++++++ lib_blackfin/board.c | 7 +++++++ lib_i386/board.c | 9 ++++++++- lib_m68k/board.c | 7 +++++++ lib_mips/board.c | 7 +++++++ lib_ppc/board.c | 7 +++++++ lib_sh/board.c | 7 +++++++ lib_sparc/board.c | 7 +++++++ 9 files changed, 64 insertions(+), 1 deletion(-) diff --git a/lib_arm/board.c b/lib_arm/board.c index a0e56d5ae8..5e3d7f65b1 100644 --- a/lib_arm/board.c +++ b/lib_arm/board.c @@ -50,6 +50,10 @@ #include #include +#ifdef CONFIG_BITBANGMII +#include +#endif + #ifdef CONFIG_DRIVER_SMC91111 #include "../drivers/net/smc91111.h" #endif @@ -417,6 +421,9 @@ extern void davinci_eth_set_mac_addr (const u_int8_t *addr); mmc_initialize (gd->bd); #endif +#ifdef CONFIG_BITBANGMII + bb_miiphy_init(); +#endif #if defined(CONFIG_CMD_NET) #if defined(CONFIG_NET_MULTI) puts ("Net: "); diff --git a/lib_avr32/board.c b/lib_avr32/board.c index 29999d8635..917ed6ce75 100644 --- a/lib_avr32/board.c +++ b/lib_avr32/board.c @@ -27,6 +27,10 @@ #include #include +#ifdef CONFIG_BITBANGMII +#include +#endif + #include #include @@ -337,6 +341,9 @@ void board_init_r(gd_t *new_gd, ulong dest_addr) if (s) load_addr = simple_strtoul(s, NULL, 16); +#ifdef CONFIG_BITBANGMII + bb_miiphy_init(); +#endif #if defined(CONFIG_CMD_NET) s = getenv("bootfile"); if (s) diff --git a/lib_blackfin/board.c b/lib_blackfin/board.c index 1053f694cb..3670d2caa4 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; @@ -270,6 +274,9 @@ 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; diff --git a/lib_i386/board.c b/lib_i386/board.c index 0262b5e2cb..12ca20f608 100644 --- a/lib_i386/board.c +++ b/lib_i386/board.c @@ -1,6 +1,6 @@ /* * (C) Copyright 2002 - * Daniel Engström, Omicron Ceti AB, daniel@omicron.se + * Daniel Engstr�m, Omicron Ceti AB, daniel@omicron.se * * (C) Copyright 2002 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. @@ -39,6 +39,10 @@ #include #include +#ifdef CONFIG_BITBANGMII +#include +#endif + DECLARE_GLOBAL_DATA_PTR; extern long _i386boot_start; @@ -351,6 +355,9 @@ void start_i386boot (void) doc_init(); #endif +#ifdef CONFIG_BITBANGMII + bb_miiphy_init(); +#endif #if defined(CONFIG_CMD_NET) #if defined(CONFIG_NET_MULTI) WATCHDOG_RESET(); diff --git a/lib_m68k/board.c b/lib_m68k/board.c index 3d885306e2..732023d67c 100644 --- a/lib_m68k/board.c +++ b/lib_m68k/board.c @@ -63,6 +63,10 @@ #include #endif +#ifdef CONFIG_BITBANGMII +#include +#endif + #include DECLARE_GLOBAL_DATA_PTR; @@ -630,6 +634,9 @@ void board_init_r (gd_t *id, ulong dest_addr) nand_init(); /* go init the NAND */ #endif +#ifdef CONFIG_BITBANGMII + bb_miiphy_init(); +#endif #if defined(CONFIG_CMD_NET) WATCHDOG_RESET(); #if defined(FEC_ENET) diff --git a/lib_mips/board.c b/lib_mips/board.c index f62a46a172..b2d113e870 100644 --- a/lib_mips/board.c +++ b/lib_mips/board.c @@ -33,6 +33,10 @@ #include #include +#ifdef CONFIG_BITBANGMII +#include +#endif + DECLARE_GLOBAL_DATA_PTR; #if ( ((CONFIG_ENV_ADDR+CONFIG_ENV_SIZE) < CONFIG_SYS_MONITOR_BASE) || \ @@ -407,6 +411,9 @@ void board_init_r (gd_t *id, ulong dest_addr) misc_init_r (); #endif +#ifdef CONFIG_BITBANGMII + bb_miiphy_init(); +#endif #if defined(CONFIG_CMD_NET) #if defined(CONFIG_NET_MULTI) puts ("Net: "); diff --git a/lib_ppc/board.c b/lib_ppc/board.c index 8b8ddb5340..796d00242b 100644 --- a/lib_ppc/board.c +++ b/lib_ppc/board.c @@ -83,6 +83,10 @@ #include #endif +#ifdef CONFIG_BITBANGMII +#include +#endif + #ifdef CONFIG_SYS_UPDATE_FLASH_SIZE extern int update_flash_size (int flash_size); #endif @@ -942,6 +946,9 @@ void board_init_r (gd_t *id, ulong dest_addr) doc_init (); #endif +#ifdef CONFIG_BITBANGMII + bb_miiphy_init(); +#endif #if defined(CONFIG_CMD_NET) #if defined(CONFIG_NET_MULTI) WATCHDOG_RESET (); diff --git a/lib_sh/board.c b/lib_sh/board.c index 5d61f0d74f..5ed40e922b 100644 --- a/lib_sh/board.c +++ b/lib_sh/board.c @@ -28,6 +28,10 @@ #include #include +#ifdef CONFIG_BITBANGMII +#include +#endif + extern void malloc_bin_reloc (void); extern int cpu_init(void); extern int board_init(void); @@ -178,6 +182,9 @@ void sh_generic_init(void) #endif /* CONFIG_WATCHDOG*/ +#ifdef CONFIG_BITBANGMII + bb_miiphy_init(); +#endif #if defined(CONFIG_CMD_NET) { char *s; diff --git a/lib_sparc/board.c b/lib_sparc/board.c index 6aadb56f63..11eea603c1 100644 --- a/lib_sparc/board.c +++ b/lib_sparc/board.c @@ -49,6 +49,10 @@ #include #endif +#ifdef CONFIG_BITBANGMII +#include +#endif + DECLARE_GLOBAL_DATA_PTR; /* Debug options @@ -405,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(); -- 2.34.1