Add bb_miiphy_init call before any ethernet bring-up code.

Signed-off-by: Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
This commit is contained in:
Luigi 'Comio' Mantellini 2009-10-10 12:42:21 +02:00 committed by Ben Warren
parent 4ba31ab33a
commit 310cecb8cc
9 changed files with 64 additions and 1 deletions

View File

@ -50,6 +50,10 @@
#include <onenand_uboot.h> #include <onenand_uboot.h>
#include <mmc.h> #include <mmc.h>
#ifdef CONFIG_BITBANGMII
#include <miiphy.h>
#endif
#ifdef CONFIG_DRIVER_SMC91111 #ifdef CONFIG_DRIVER_SMC91111
#include "../drivers/net/smc91111.h" #include "../drivers/net/smc91111.h"
#endif #endif
@ -417,6 +421,9 @@ extern void davinci_eth_set_mac_addr (const u_int8_t *addr);
mmc_initialize (gd->bd); mmc_initialize (gd->bd);
#endif #endif
#ifdef CONFIG_BITBANGMII
bb_miiphy_init();
#endif
#if defined(CONFIG_CMD_NET) #if defined(CONFIG_CMD_NET)
#if defined(CONFIG_NET_MULTI) #if defined(CONFIG_NET_MULTI)
puts ("Net: "); puts ("Net: ");

View File

@ -27,6 +27,10 @@
#include <version.h> #include <version.h>
#include <net.h> #include <net.h>
#ifdef CONFIG_BITBANGMII
#include <miiphy.h>
#endif
#include <asm/initcalls.h> #include <asm/initcalls.h>
#include <asm/sections.h> #include <asm/sections.h>
@ -337,6 +341,9 @@ void board_init_r(gd_t *new_gd, ulong dest_addr)
if (s) if (s)
load_addr = simple_strtoul(s, NULL, 16); load_addr = simple_strtoul(s, NULL, 16);
#ifdef CONFIG_BITBANGMII
bb_miiphy_init();
#endif
#if defined(CONFIG_CMD_NET) #if defined(CONFIG_CMD_NET)
s = getenv("bootfile"); s = getenv("bootfile");
if (s) if (s)

View File

@ -26,6 +26,10 @@
#include <nand.h> /* cannot even include nand.h if it isnt configured */ #include <nand.h> /* cannot even include nand.h if it isnt configured */
#endif #endif
#ifdef CONFIG_BITBANGMII
#include <miiphy.h>
#endif
#if defined(CONFIG_POST) #if defined(CONFIG_POST)
#include <post.h> #include <post.h>
int post_flag; int post_flag;
@ -270,6 +274,9 @@ void board_init_f(ulong bootflag)
static void board_net_init_r(bd_t *bd) static void board_net_init_r(bd_t *bd)
{ {
#ifdef CONFIG_BITBANGMII
bb_miiphy_init();
#endif
#ifdef CONFIG_CMD_NET #ifdef CONFIG_CMD_NET
uchar enetaddr[6]; uchar enetaddr[6];
char *s; char *s;

View File

@ -1,6 +1,6 @@
/* /*
* (C) Copyright 2002 * (C) Copyright 2002
* Daniel Engström, Omicron Ceti AB, daniel@omicron.se * Daniel Engstr<EFBFBD>m, Omicron Ceti AB, daniel@omicron.se
* *
* (C) Copyright 2002 * (C) Copyright 2002
* Wolfgang Denk, DENX Software Engineering, wd@denx.de. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
@ -39,6 +39,10 @@
#include <ide.h> #include <ide.h>
#include <asm/u-boot-i386.h> #include <asm/u-boot-i386.h>
#ifdef CONFIG_BITBANGMII
#include <miiphy.h>
#endif
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
extern long _i386boot_start; extern long _i386boot_start;
@ -351,6 +355,9 @@ void start_i386boot (void)
doc_init(); doc_init();
#endif #endif
#ifdef CONFIG_BITBANGMII
bb_miiphy_init();
#endif
#if defined(CONFIG_CMD_NET) #if defined(CONFIG_CMD_NET)
#if defined(CONFIG_NET_MULTI) #if defined(CONFIG_NET_MULTI)
WATCHDOG_RESET(); WATCHDOG_RESET();

View File

@ -63,6 +63,10 @@
#include <spi.h> #include <spi.h>
#endif #endif
#ifdef CONFIG_BITBANGMII
#include <miiphy.h>
#endif
#include <nand.h> #include <nand.h>
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
@ -630,6 +634,9 @@ void board_init_r (gd_t *id, ulong dest_addr)
nand_init(); /* go init the NAND */ nand_init(); /* go init the NAND */
#endif #endif
#ifdef CONFIG_BITBANGMII
bb_miiphy_init();
#endif
#if defined(CONFIG_CMD_NET) #if defined(CONFIG_CMD_NET)
WATCHDOG_RESET(); WATCHDOG_RESET();
#if defined(FEC_ENET) #if defined(FEC_ENET)

View File

@ -33,6 +33,10 @@
#include <onenand_uboot.h> #include <onenand_uboot.h>
#include <spi.h> #include <spi.h>
#ifdef CONFIG_BITBANGMII
#include <miiphy.h>
#endif
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
#if ( ((CONFIG_ENV_ADDR+CONFIG_ENV_SIZE) < CONFIG_SYS_MONITOR_BASE) || \ #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 (); misc_init_r ();
#endif #endif
#ifdef CONFIG_BITBANGMII
bb_miiphy_init();
#endif
#if defined(CONFIG_CMD_NET) #if defined(CONFIG_CMD_NET)
#if defined(CONFIG_NET_MULTI) #if defined(CONFIG_NET_MULTI)
puts ("Net: "); puts ("Net: ");

View File

@ -83,6 +83,10 @@
#include <asm/mp.h> #include <asm/mp.h>
#endif #endif
#ifdef CONFIG_BITBANGMII
#include <miiphy.h>
#endif
#ifdef CONFIG_SYS_UPDATE_FLASH_SIZE #ifdef CONFIG_SYS_UPDATE_FLASH_SIZE
extern int update_flash_size (int flash_size); extern int update_flash_size (int flash_size);
#endif #endif
@ -942,6 +946,9 @@ void board_init_r (gd_t *id, ulong dest_addr)
doc_init (); doc_init ();
#endif #endif
#ifdef CONFIG_BITBANGMII
bb_miiphy_init();
#endif
#if defined(CONFIG_CMD_NET) #if defined(CONFIG_CMD_NET)
#if defined(CONFIG_NET_MULTI) #if defined(CONFIG_NET_MULTI)
WATCHDOG_RESET (); WATCHDOG_RESET ();

View File

@ -28,6 +28,10 @@
#include <net.h> #include <net.h>
#include <environment.h> #include <environment.h>
#ifdef CONFIG_BITBANGMII
#include <miiphy.h>
#endif
extern void malloc_bin_reloc (void); extern void malloc_bin_reloc (void);
extern int cpu_init(void); extern int cpu_init(void);
extern int board_init(void); extern int board_init(void);
@ -178,6 +182,9 @@ void sh_generic_init(void)
#endif /* CONFIG_WATCHDOG*/ #endif /* CONFIG_WATCHDOG*/
#ifdef CONFIG_BITBANGMII
bb_miiphy_init();
#endif
#if defined(CONFIG_CMD_NET) #if defined(CONFIG_CMD_NET)
{ {
char *s; char *s;

View File

@ -49,6 +49,10 @@
#include <ambapp.h> #include <ambapp.h>
#endif #endif
#ifdef CONFIG_BITBANGMII
#include <miiphy.h>
#endif
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
/* Debug options /* Debug options
@ -405,6 +409,9 @@ void board_init_f(ulong bootflag)
doc_init(); doc_init();
#endif #endif
#ifdef CONFIG_BITBANGMII
bb_miiphy_init();
#endif
#if defined(CONFIG_CMD_NET) #if defined(CONFIG_CMD_NET)
#if defined(CONFIG_NET_MULTI) #if defined(CONFIG_NET_MULTI)
WATCHDOG_RESET(); WATCHDOG_RESET();