Moved initialization of EEPRO100 Ethernet controller to board_eth_init()

Affected boards:
	db64360
	db64460
	katmai
	taihu
	taishan
	yucca
	cpc45
	cpu87
	eXalion
	elppc
	debris
	kvme080
	mpc8315erdb
	integratorap
	ixdp425
	oxc
	pm826
	pm828
	pm854
	pm856
	ppmc7xx
	sc3
	sc520_spunk
	sorcery
	tqm8272
	tqm85xx
	utx8245

Removed initialization of the driver from net/eth.c
Also, wrapped contents of pci_eth_init() by CONFIG_PCI.

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
master
Ben Warren 16 years ago
parent 8ca0b3f99c
commit 10efa024b8
  1. 6
      board/Marvell/db64360/db64360.c
  2. 6
      board/Marvell/db64460/db64460.c
  3. 6
      board/amcc/katmai/katmai.c
  4. 6
      board/amcc/taihu/taihu.c
  5. 6
      board/amcc/taishan/taishan.c
  6. 6
      board/amcc/yucca/yucca.c
  7. 6
      board/cpc45/cpc45.c
  8. 6
      board/cpu87/cpu87.c
  9. 6
      board/eXalion/eXalion.c
  10. 6
      board/eltec/elppc/elppc.c
  11. 6
      board/etin/debris/debris.c
  12. 6
      board/etin/kvme080/kvme080.c
  13. 7
      board/freescale/mpc8315erdb/mpc8315erdb.c
  14. 7
      board/integratorap/integratorap.c
  15. 6
      board/ixdp425/ixdp425.c
  16. 6
      board/oxc/oxc.c
  17. 6
      board/pm826/pm826.c
  18. 6
      board/pm828/pm828.c
  19. 1
      board/pm854/pm854.c
  20. 7
      board/pm856/pm856.c
  21. 6
      board/ppmc7xx/ppmc7xx.c
  22. 6
      board/sc3/sc3.c
  23. 6
      board/sc520_spunk/sc520_spunk.c
  24. 6
      board/sorcery/sorcery.c
  25. 6
      board/tqc/tqm8272/tqm8272.c
  26. 7
      board/tqc/tqm85xx/tqm85xx.c
  27. 6
      board/utx8245/utx8245.c
  28. 1
      drivers/net/eepro100.c
  29. 8
      include/netdev.h
  30. 4
      net/eth.c

@ -33,6 +33,7 @@
#include "../include/pci.h" #include "../include/pci.h"
#include "../include/mv_gen_reg.h" #include "../include/mv_gen_reg.h"
#include <net.h> #include <net.h>
#include <netdev.h>
#include "eth.h" #include "eth.h"
#include "mpsc.h" #include "mpsc.h"
@ -929,3 +930,8 @@ void board_prebootm_init ()
icache_disable (); icache_disable ();
dcache_disable (); dcache_disable ();
} }
int board_eth_init(bd_t *bis)
{
return pci_eth_init(bis);
}

@ -33,6 +33,7 @@
#include "../include/pci.h" #include "../include/pci.h"
#include "../include/mv_gen_reg.h" #include "../include/mv_gen_reg.h"
#include <net.h> #include <net.h>
#include <netdev.h>
#include "eth.h" #include "eth.h"
#include "mpsc.h" #include "mpsc.h"
@ -929,3 +930,8 @@ void board_prebootm_init ()
icache_disable (); icache_disable ();
dcache_disable (); dcache_disable ();
} }
int board_eth_init(bd_t *bis)
{
return pci_eth_init(bis);
}

@ -27,6 +27,7 @@
#include <i2c.h> #include <i2c.h>
#include <libfdt.h> #include <libfdt.h>
#include <fdt_support.h> #include <fdt_support.h>
#include <netdev.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/gpio.h> #include <asm/gpio.h>
@ -447,3 +448,8 @@ int post_hotkeys_pressed(void)
return (ctrlc()); return (ctrlc());
} }
#endif #endif
int board_eth_init(bd_t *bis)
{
return pci_eth_init(bis);
}

@ -28,6 +28,7 @@
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/io.h> #include <asm/io.h>
#include <spi.h> #include <spi.h>
#include <netdev.h>
#include <asm/gpio.h> #include <asm/gpio.h>
extern int lcd_init(void); extern int lcd_init(void);
@ -200,3 +201,8 @@ int pci_pre_init(struct pci_controller *hose)
return 1; return 1;
} }
#endif /* CONFIG_PCI */ #endif /* CONFIG_PCI */
int board_eth_init(bd_t *bis)
{
return pci_eth_init(bis);
}

@ -27,6 +27,7 @@
#include <asm/processor.h> #include <asm/processor.h>
#include <spd_sdram.h> #include <spd_sdram.h>
#include <ppc4xx_enet.h> #include <ppc4xx_enet.h>
#include <netdev.h>
#ifdef CFG_INIT_SHOW_RESET_REG #ifdef CFG_INIT_SHOW_RESET_REG
void show_reset_reg(void); void show_reset_reg(void);
@ -311,3 +312,8 @@ int post_hotkeys_pressed(void)
return (ctrlc()); return (ctrlc());
} }
#endif #endif
int board_eth_init(bd_t *bis)
{
return pci_eth_init(bis);
}

@ -28,6 +28,7 @@
#include <common.h> #include <common.h>
#include <ppc4xx.h> #include <ppc4xx.h>
#include <i2c.h> #include <i2c.h>
#include <netdev.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/4xx_pcie.h> #include <asm/4xx_pcie.h>
@ -952,3 +953,8 @@ int onboard_pci_arbiter_selected(int core_pci)
#endif #endif
return (BOARD_OPTION_NOT_SELECTED); return (BOARD_OPTION_NOT_SELECTED);
} }
int board_eth_init(bd_t *bis)
{
return pci_eth_init(bis);
}

@ -27,6 +27,7 @@
#include <asm/io.h> #include <asm/io.h>
#include <pci.h> #include <pci.h>
#include <i2c.h> #include <i2c.h>
#include <netdev.h>
int sysControlDisplay(int digit, uchar ascii_code); int sysControlDisplay(int digit, uchar ascii_code);
extern void Plx9030Init(void); extern void Plx9030Init(void);
@ -273,3 +274,8 @@ void ide_led (uchar led, uchar status)
writeb(val, BCSR_BASE + 0x04); writeb(val, BCSR_BASE + 0x04);
} }
# endif # endif
int board_eth_init(bd_t *bis)
{
return pci_eth_init(bis);
}

@ -26,6 +26,7 @@
#include <mpc8260.h> #include <mpc8260.h>
#include "cpu87.h" #include "cpu87.h"
#include <pci.h> #include <pci.h>
#include <netdev.h>
/* /*
* I/O Port configuration table * I/O Port configuration table
@ -339,3 +340,8 @@ void pci_init_board(void)
pci_mpc8250_init(&hose); pci_mpc8250_init(&hose);
} }
#endif #endif
int board_eth_init(bd_t *bis)
{
return pci_eth_init(bis);
}

@ -30,6 +30,7 @@
#include <asm/io.h> #include <asm/io.h>
#include <pci.h> #include <pci.h>
#include <ide.h> #include <ide.h>
#include <netdev.h>
#include "piix_pci.h" #include "piix_pci.h"
#include "eXalion.h" #include "eXalion.h"
@ -290,3 +291,8 @@ void pci_init_board (void)
{ {
pci_mpc824x_init (&hose); pci_mpc824x_init (&hose);
} }
int board_eth_init(bd_t *bis)
{
return pci_eth_init(bis);
}

@ -25,6 +25,7 @@
#include <command.h> #include <command.h>
#include <mpc106.h> #include <mpc106.h>
#include <video_fb.h> #include <video_fb.h>
#include <netdev.h>
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
@ -172,3 +173,8 @@ void video_get_info_str (int line_number, char *info)
return; return;
} }
#endif #endif
int board_eth_init(bd_t *bis)
{
return pci_eth_init(bis);
}

@ -25,6 +25,7 @@
#include <mpc824x.h> #include <mpc824x.h>
#include <pci.h> #include <pci.h>
#include <i2c.h> #include <i2c.h>
#include <netdev.h>
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
@ -177,3 +178,8 @@ int misc_init_r(void)
(char*)&gd->bd->bi_enetaddr[0], 6); (char*)&gd->bd->bi_enetaddr[0], 6);
return 0; return 0;
} }
int board_eth_init(bd_t *bis)
{
return pci_eth_init(bis);
}

@ -25,6 +25,7 @@
#include <mpc824x.h> #include <mpc824x.h>
#include <pci.h> #include <pci.h>
#include <i2c.h> #include <i2c.h>
#include <netdev.h>
#include <asm/processor.h> #include <asm/processor.h>
int checkboard(void) int checkboard(void)
@ -191,3 +192,8 @@ void nvram_write(long dest, const void *src, size_t count)
asm volatile("sync"); asm volatile("sync");
} }
} }
int board_eth_init(bd_t *bis)
{
return pci_eth_init(bis);
}

@ -29,6 +29,7 @@
#include <fdt_support.h> #include <fdt_support.h>
#include <pci.h> #include <pci.h>
#include <mpc83xx.h> #include <mpc83xx.h>
#include <netdev.h>
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
@ -165,3 +166,9 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_tsec1_fixup(blob, bd); fdt_tsec1_fixup(blob, bd);
} }
#endif #endif
int board_eth_init(bd_t *bis)
{
cpu_eth_init(bis); /* Initialize TSECs first */
return pci_eth_init(bis);
}

@ -39,6 +39,8 @@
#include <pci.h> #include <pci.h>
#endif #endif
#include <netdev.h>
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
void flash__init (void); void flash__init (void);
@ -647,3 +649,8 @@ ulong get_tbclk (void)
{ {
return CFG_HZ_CLOCK/div_clock; return CFG_HZ_CLOCK/div_clock;
} }
int board_eth_init(bd_t *bis)
{
return pci_eth_init(bis);
}

@ -31,6 +31,7 @@
#include <common.h> #include <common.h>
#include <command.h> #include <command.h>
#include <malloc.h> #include <malloc.h>
#include <netdev.h>
#include <asm/arch/ixp425.h> #include <asm/arch/ixp425.h>
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
@ -118,3 +119,8 @@ void pci_init_board(void)
pci_ixp_init(&hose); pci_ixp_init(&hose);
} }
#endif #endif
int board_eth_init(bd_t *bis)
{
return pci_eth_init(bis);
}

@ -25,6 +25,7 @@
#include <mpc824x.h> #include <mpc824x.h>
#include <pci.h> #include <pci.h>
#include <i2c.h> #include <i2c.h>
#include <netdev.h>
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
@ -215,3 +216,8 @@ int misc_init_r (void)
#endif #endif
return (0); return (0);
} }
int board_eth_init(bd_t *bis)
{
return pci_eth_init(bis);
}

@ -25,6 +25,7 @@
#include <ioports.h> #include <ioports.h>
#include <mpc8260.h> #include <mpc8260.h>
#include <pci.h> #include <pci.h>
#include <netdev.h>
/* /*
* I/O Port configuration table * I/O Port configuration table
@ -328,3 +329,8 @@ void pci_init_board(void)
pci_mpc8250_init(&hose); pci_mpc8250_init(&hose);
} }
#endif #endif
int board_eth_init(bd_t *bis)
{
return pci_eth_init(bis);
}

@ -25,6 +25,7 @@
#include <ioports.h> #include <ioports.h>
#include <mpc8260.h> #include <mpc8260.h>
#include <pci.h> #include <pci.h>
#include <netdev.h>
/* /*
* I/O Port configuration table * I/O Port configuration table
@ -361,3 +362,8 @@ void pci_init_board(void)
pci_mpc8250_init(&hose); pci_mpc8250_init(&hose);
} }
#endif #endif
int board_eth_init(bd_t *bis)
{
return pci_eth_init(bis);
}

@ -293,5 +293,6 @@ pci_init_board(void)
int board_eth_init(bd_t *bis) int board_eth_init(bd_t *bis)
{ {
cpu_eth_init(bis); /* Intialize TSECs first */
return pci_eth_init(bis); return pci_eth_init(bis);
} }

@ -34,6 +34,7 @@
#include <ioports.h> #include <ioports.h>
#include <spd_sdram.h> #include <spd_sdram.h>
#include <miiphy.h> #include <miiphy.h>
#include <netdev.h>
#if defined(CONFIG_DDR_ECC) #if defined(CONFIG_DDR_ECC)
extern void ddr_enable_ecc(unsigned int dram_size); extern void ddr_enable_ecc(unsigned int dram_size);
@ -444,3 +445,9 @@ pci_init_board(void)
pci_mpc85xx_init(&hose); pci_mpc85xx_init(&hose);
#endif /* CONFIG_PCI */ #endif /* CONFIG_PCI */
} }
int board_eth_init(bd_t *bis)
{
cpu_eth_init(bis); /* Intialize TSECs first */
return pci_eth_init(bis);
}

@ -10,6 +10,7 @@
#include <common.h> #include <common.h>
#include <command.h> #include <command.h>
#include <netdev.h>
/* Define some MPC107 (memory controller) registers */ /* Define some MPC107 (memory controller) registers */
@ -102,3 +103,8 @@ void do_reset( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[] )
/* Should never get here */ /* Should never get here */
while(1); while(1);
} }
int board_eth_init(bd_t *bis)
{
return pci_eth_init(bis);
}

@ -37,6 +37,7 @@
#include <pci.h> #include <pci.h>
#include <i2c.h> #include <i2c.h>
#include <malloc.h> #include <malloc.h>
#include <netdev.h>
#undef writel #undef writel
#undef writeb #undef writeb
@ -779,3 +780,8 @@ void pci_init_board(void)
hose.config_table = pci_solidcard3_config_table; hose.config_table = pci_solidcard3_config_table;
pci_405gp_init(&hose); pci_405gp_init(&hose);
} }
int board_eth_init(bd_t *bis)
{
return pci_eth_init(bis);
}

@ -25,6 +25,7 @@
#include <common.h> #include <common.h>
#include <pci.h> #include <pci.h>
#include <ssi.h> #include <ssi.h>
#include <netdev.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/pci.h> #include <asm/pci.h>
#include <asm/ic/sc520.h> #include <asm/ic/sc520.h>
@ -676,3 +677,8 @@ ssize_t spi_write(uchar *addr, int alen, uchar *buffer, int len)
spi_eeprom_write(1, offset, buffer, len) : spi_eeprom_write(1, offset, buffer, len) :
mw_eeprom_write(1, offset, buffer, len); mw_eeprom_write(1, offset, buffer, len);
} }
int board_eth_init(bd_t *bis)
{
return pci_eth_init(bis);
}

@ -26,6 +26,7 @@
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/mmu.h> #include <asm/mmu.h>
#include <pci.h> #include <pci.h>
#include <netdev.h>
phys_size_t initdram (int board_type) phys_size_t initdram (int board_type)
{ {
@ -58,3 +59,8 @@ void pci_init_board (void)
pci_mpc8220_init (&hose); pci_mpc8220_init (&hose);
#endif /* CONFIG_PCI */ #endif /* CONFIG_PCI */
} }
int board_eth_init(bd_t *bis)
{
return pci_eth_init(bis);
}

@ -26,6 +26,7 @@
#include <mpc8260.h> #include <mpc8260.h>
#include <command.h> #include <command.h>
#include <netdev.h>
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
#include <pci.h> #include <pci.h>
#include <asm/m8260_pci.h> #include <asm/m8260_pci.h>
@ -1226,3 +1227,8 @@ void pci_init_board(void)
pci_mpc8250_init(&hose); pci_mpc8250_init(&hose);
} }
#endif #endif
int board_eth_init(bd_t *bis)
{
return pci_eth_init(bis);
}

@ -42,6 +42,7 @@
#include <flash.h> #include <flash.h>
#include <libfdt.h> #include <libfdt.h>
#include <fdt_support.h> #include <fdt_support.h>
#include <netdev.h>
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
@ -743,3 +744,9 @@ int board_early_init_r (void)
return (0); return (0);
} }
#endif /* CONFIG_BOARD_EARLY_INIT_R */ #endif /* CONFIG_BOARD_EARLY_INIT_R */
int board_eth_init(bd_t *bis)
{
cpu_eth_init(bis); /* Intialize TSECs first */
return pci_eth_init(bis);
}

@ -32,6 +32,7 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/mmu.h> #include <asm/mmu.h>
#include <pci.h> #include <pci.h>
#include <netdev.h>
#define SAVE_SZ 32 #define SAVE_SZ 32
@ -127,3 +128,8 @@ void pci_init_board (void)
icache_enable(); icache_enable();
} }
int board_eth_init(bd_t *bis)
{
return pci_eth_init(bis);
}

@ -24,6 +24,7 @@
#include <common.h> #include <common.h>
#include <malloc.h> #include <malloc.h>
#include <net.h> #include <net.h>
#include <netdev.h>
#include <asm/io.h> #include <asm/io.h>
#include <pci.h> #include <pci.h>
#include <miiphy.h> #include <miiphy.h>

@ -44,6 +44,7 @@ int cpu_eth_init(bd_t *bis);
int bfin_EMAC_initialize(bd_t *bis); int bfin_EMAC_initialize(bd_t *bis);
int dc21x4x_initialize(bd_t *bis); int dc21x4x_initialize(bd_t *bis);
int e1000_initialize(bd_t *bis); int e1000_initialize(bd_t *bis);
int eepro100_initialize(bd_t *bis);
int eth_3com_initialize (bd_t * bis); int eth_3com_initialize (bd_t * bis);
int greth_initialize(bd_t *bis); int greth_initialize(bd_t *bis);
void gt6426x_eth_initialize(bd_t *bis); void gt6426x_eth_initialize(bd_t *bis);
@ -71,6 +72,11 @@ static inline int pci_eth_init(bd_t *bis)
{ {
int num = 0; int num = 0;
#ifdef CONFIG_PCI
#ifdef CONFIG_EEPRO100
num += eepro100_initialize(bis);
#endif
#ifdef CONFIG_TULIP #ifdef CONFIG_TULIP
num += dc21x4x_initialize(bis); num += dc21x4x_initialize(bis);
#endif #endif
@ -95,6 +101,8 @@ static inline int pci_eth_init(bd_t *bis)
#if defined(CONFIG_ULI526) #if defined(CONFIG_ULI526)
num += uli526x_initialize(bis); num += uli526x_initialize(bis);
#endif #endif
#endif /* CONFIG_PCI */
return num; return num;
} }

@ -40,7 +40,6 @@ int cpu_eth_init(bd_t *bis) __attribute((weak, alias("__def_eth_init")));
int board_eth_init(bd_t *bis) __attribute((weak, alias("__def_eth_init"))); int board_eth_init(bd_t *bis) __attribute((weak, alias("__def_eth_init")));
extern int au1x00_enet_initialize(bd_t*); extern int au1x00_enet_initialize(bd_t*);
extern int eepro100_initialize(bd_t*);
extern int fec_initialize(bd_t*); extern int fec_initialize(bd_t*);
extern int mpc8220_fec_initialize(bd_t*); extern int mpc8220_fec_initialize(bd_t*);
extern int mv6436x_eth_initialize(bd_t *); extern int mv6436x_eth_initialize(bd_t *);
@ -191,9 +190,6 @@ int eth_initialize(bd_t *bis)
#if defined(CONFIG_IXP4XX_NPE) #if defined(CONFIG_IXP4XX_NPE)
npe_initialize(bis); npe_initialize(bis);
#endif #endif
#ifdef CONFIG_EEPRO100
eepro100_initialize(bis);
#endif
if (!eth_devices) { if (!eth_devices) {
puts ("No ethernet found.\n"); puts ("No ethernet found.\n");
show_boot_progress (-64); show_boot_progress (-64);

Loading…
Cancel
Save