]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Moved initialization of EEPRO100 Ethernet controller to board_eth_init()
authorBen Warren <biggerbadderben@gmail.com>
Mon, 1 Sep 2008 03:37:00 +0000 (20:37 -0700)
committerBen Warren <biggerbadderben@gmail.com>
Wed, 3 Sep 2008 04:18:19 +0000 (21:18 -0700)
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>
30 files changed:
board/Marvell/db64360/db64360.c
board/Marvell/db64460/db64460.c
board/amcc/katmai/katmai.c
board/amcc/taihu/taihu.c
board/amcc/taishan/taishan.c
board/amcc/yucca/yucca.c
board/cpc45/cpc45.c
board/cpu87/cpu87.c
board/eXalion/eXalion.c
board/eltec/elppc/elppc.c
board/etin/debris/debris.c
board/etin/kvme080/kvme080.c
board/freescale/mpc8315erdb/mpc8315erdb.c
board/integratorap/integratorap.c
board/ixdp425/ixdp425.c
board/oxc/oxc.c
board/pm826/pm826.c
board/pm828/pm828.c
board/pm854/pm854.c
board/pm856/pm856.c
board/ppmc7xx/ppmc7xx.c
board/sc3/sc3.c
board/sc520_spunk/sc520_spunk.c
board/sorcery/sorcery.c
board/tqc/tqm8272/tqm8272.c
board/tqc/tqm85xx/tqm85xx.c
board/utx8245/utx8245.c
drivers/net/eepro100.c
include/netdev.h
net/eth.c

index 2a810a618b09026ad372a9c3675916c6f6359dea..c03d03d3876ec6561bb85e98e8f47e1533749bee 100644 (file)
@@ -33,6 +33,7 @@
 #include "../include/pci.h"
 #include "../include/mv_gen_reg.h"
 #include <net.h>
+#include <netdev.h>
 
 #include "eth.h"
 #include "mpsc.h"
@@ -929,3 +930,8 @@ void board_prebootm_init ()
        icache_disable ();
        dcache_disable ();
 }
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
index 1ae898d1ee9c2e826563ca1fc909cc4d1c91b57f..8a05cd20985a130a1dee3d91b7039ecf66742f72 100644 (file)
@@ -33,6 +33,7 @@
 #include "../include/pci.h"
 #include "../include/mv_gen_reg.h"
 #include <net.h>
+#include <netdev.h>
 
 #include "eth.h"
 #include "mpsc.h"
@@ -929,3 +930,8 @@ void board_prebootm_init ()
        icache_disable ();
        dcache_disable ();
 }
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
index 08d89d7791135bb6fee300b4defe996b59a6298a..172b5811e3ecfdb31af0dd283d13bf0429d159ad 100644 (file)
@@ -27,6 +27,7 @@
 #include <i2c.h>
 #include <libfdt.h>
 #include <fdt_support.h>
+#include <netdev.h>
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
@@ -447,3 +448,8 @@ int post_hotkeys_pressed(void)
        return (ctrlc());
 }
 #endif
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
index 254e3eb837b37b221ce4c64a186158da1ba4377a..266f2601c5d909a7562268856865fbbce5e9ef18 100644 (file)
@@ -28,6 +28,7 @@
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <spi.h>
+#include <netdev.h>
 #include <asm/gpio.h>
 
 extern int lcd_init(void);
@@ -200,3 +201,8 @@ int pci_pre_init(struct pci_controller *hose)
        return 1;
 }
 #endif /* CONFIG_PCI */
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
index fdd82e7ccad1b7db89bc3921216c7a8afe2fbbab..cd432cb98bfa0b71b6b0ca910c31ad5a48abb6d4 100644 (file)
@@ -27,6 +27,7 @@
 #include <asm/processor.h>
 #include <spd_sdram.h>
 #include <ppc4xx_enet.h>
+#include <netdev.h>
 
 #ifdef CFG_INIT_SHOW_RESET_REG
 void show_reset_reg(void);
@@ -311,3 +312,8 @@ int post_hotkeys_pressed(void)
        return (ctrlc());
 }
 #endif
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
index 84c3938d7d0a68533dc41e32e82513cb13f9815b..e0c12687d39d6daa9d051ca21d8d095a18622431 100644 (file)
@@ -28,6 +28,7 @@
 #include <common.h>
 #include <ppc4xx.h>
 #include <i2c.h>
+#include <netdev.h>
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <asm/4xx_pcie.h>
@@ -952,3 +953,8 @@ int onboard_pci_arbiter_selected(int core_pci)
 #endif
        return (BOARD_OPTION_NOT_SELECTED);
 }
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
index f4e867ce7d00891c4ca9e141353cd90fcd8c8737..16ead75def07b65eb11ebc841a1bf5b676ab5922 100644 (file)
@@ -27,6 +27,7 @@
 #include <asm/io.h>
 #include <pci.h>
 #include <i2c.h>
+#include <netdev.h>
 
 int sysControlDisplay(int digit, uchar ascii_code);
 extern void Plx9030Init(void);
@@ -273,3 +274,8 @@ void ide_led (uchar led, uchar status)
        writeb(val, BCSR_BASE + 0x04);
 }
 # endif
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
index f5a5de5d820b645ec789db1cf19e229c319e4167..454987cff299599e26c9eaa80a7b4b033b64796b 100644 (file)
@@ -26,6 +26,7 @@
 #include <mpc8260.h>
 #include "cpu87.h"
 #include <pci.h>
+#include <netdev.h>
 
 /*
  * I/O Port configuration table
@@ -339,3 +340,8 @@ void pci_init_board(void)
        pci_mpc8250_init(&hose);
 }
 #endif
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
index 385b498d09f287783ae7ae5ca9a7e55955c6dc65..c5dff24f05ad2d1cb0147a464136e6d85e4152be 100644 (file)
@@ -30,6 +30,7 @@
 #include <asm/io.h>
 #include <pci.h>
 #include <ide.h>
+#include <netdev.h>
 #include "piix_pci.h"
 #include "eXalion.h"
 
@@ -290,3 +291,8 @@ void pci_init_board (void)
 {
        pci_mpc824x_init (&hose);
 }
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
index 1b70605e28a282cc62882a77f60b8bde13a6d7fe..d3ac2784acb2eea9a4f78835f76cacd8672edcb4 100644 (file)
@@ -25,6 +25,7 @@
 #include <command.h>
 #include <mpc106.h>
 #include <video_fb.h>
+#include <netdev.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -172,3 +173,8 @@ void video_get_info_str (int line_number, char *info)
        return;
 }
 #endif
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
index 763760fd23e6464ec831816f866e748c2ba71af6..3fcf78ecfd1a7487e41d9d3cbd23dc44e9a72554 100644 (file)
@@ -25,6 +25,7 @@
 #include <mpc824x.h>
 #include <pci.h>
 #include <i2c.h>
+#include <netdev.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -177,3 +178,8 @@ int misc_init_r(void)
                        (char*)&gd->bd->bi_enetaddr[0], 6);
        return 0;
 }
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
index bfd6854c5d661b2c1c2f3afb7f824f4205af3731..be6924d15a479828625fd5539b4791f1f74c9cd7 100644 (file)
@@ -25,6 +25,7 @@
 #include <mpc824x.h>
 #include <pci.h>
 #include <i2c.h>
+#include <netdev.h>
 #include <asm/processor.h>
 
 int checkboard(void)
@@ -191,3 +192,8 @@ void nvram_write(long dest, const void *src, size_t count)
                asm volatile("sync");
        }
 }
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
index 3eecee2519a5eba17654f2c5f23f0a390bf5c1a8..033021876941331b976a13cbdab78270f38e45a4 100644 (file)
@@ -29,6 +29,7 @@
 #include <fdt_support.h>
 #include <pci.h>
 #include <mpc83xx.h>
+#include <netdev.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -165,3 +166,9 @@ void ft_board_setup(void *blob, bd_t *bd)
        fdt_tsec1_fixup(blob, bd);
 }
 #endif
+
+int board_eth_init(bd_t *bis)
+{
+       cpu_eth_init(bis);      /* Initialize TSECs first */
+       return pci_eth_init(bis);
+}
index e659907567ba748bab17e0b18ccb601dd0e6e295..687c486c821cdb103dfb727e38803bffa51b472a 100644 (file)
@@ -39,6 +39,8 @@
 #include <pci.h>
 #endif
 
+#include <netdev.h>
+
 DECLARE_GLOBAL_DATA_PTR;
 
 void flash__init (void);
@@ -647,3 +649,8 @@ ulong get_tbclk (void)
 {
        return CFG_HZ_CLOCK/div_clock;
 }
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
index e0d763780e523c2942f79be1a32f7a5ba2d380c5..b379c7535f09269a300c25665367c400a8eb290e 100644 (file)
@@ -31,6 +31,7 @@
 #include <common.h>
 #include <command.h>
 #include <malloc.h>
+#include <netdev.h>
 #include <asm/arch/ixp425.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -118,3 +119,8 @@ void pci_init_board(void)
        pci_ixp_init(&hose);
 }
 #endif
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
index b61d3995121ef7bfa84453736bdab56a0c0be763..eb7eeb8c28f9c82859f08b2c3f21c465a23685b0 100644 (file)
@@ -25,6 +25,7 @@
 #include <mpc824x.h>
 #include <pci.h>
 #include <i2c.h>
+#include <netdev.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -215,3 +216,8 @@ int misc_init_r (void)
 #endif
        return (0);
 }
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
index 7ee3ab65c06483101984c17729eb29f3ac8d99ac..d8b0929cf48038c67f3f4677cbcf841719ac8439 100644 (file)
@@ -25,6 +25,7 @@
 #include <ioports.h>
 #include <mpc8260.h>
 #include <pci.h>
+#include <netdev.h>
 
 /*
  * I/O Port configuration table
@@ -328,3 +329,8 @@ void pci_init_board(void)
        pci_mpc8250_init(&hose);
 }
 #endif
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
index 6038e9758d16325d6bf1f93e0104d56825e950ff..b163d5b35d3895b1ced84a7f120f8e69673b579e 100644 (file)
@@ -25,6 +25,7 @@
 #include <ioports.h>
 #include <mpc8260.h>
 #include <pci.h>
+#include <netdev.h>
 
 /*
  * I/O Port configuration table
@@ -361,3 +362,8 @@ void pci_init_board(void)
        pci_mpc8250_init(&hose);
 }
 #endif
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
index f366814618fc69f93d0af84ea5d58dc0a0cc1c10..90523bda531d3cb7b5c53336f7f586d5f3c2805f 100644 (file)
@@ -293,5 +293,6 @@ pci_init_board(void)
 
 int board_eth_init(bd_t *bis)
 {
+       cpu_eth_init(bis);      /* Intialize TSECs first */
        return pci_eth_init(bis);
 }
index bd4c0651ae917524a713078f2409c592cb9b375b..ee33286aca4f9a966eca71d0778ce0679cd43972 100644 (file)
@@ -34,6 +34,7 @@
 #include <ioports.h>
 #include <spd_sdram.h>
 #include <miiphy.h>
+#include <netdev.h>
 
 #if defined(CONFIG_DDR_ECC)
 extern void ddr_enable_ecc(unsigned int dram_size);
@@ -444,3 +445,9 @@ pci_init_board(void)
        pci_mpc85xx_init(&hose);
 #endif /* CONFIG_PCI */
 }
+
+int board_eth_init(bd_t *bis)
+{
+       cpu_eth_init(bis);      /* Intialize TSECs first */
+       return pci_eth_init(bis);
+}
index 061e01ec4fcbd2fa27f144e8d34d4ea18a344026..9c87c1078c56a44232ecd183c8cabb5848be6d5e 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <netdev.h>
 
 
 /* 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 */
        while(1);
 }
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
index 3d1a6542dc3bd044936b11fd2ad62ef532068c60..6c82fe7e992a3d7434080cd6a2c24125a287743a 100644 (file)
@@ -37,6 +37,7 @@
 #include <pci.h>
 #include <i2c.h>
 #include <malloc.h>
+#include <netdev.h>
 
 #undef writel
 #undef writeb
@@ -779,3 +780,8 @@ void pci_init_board(void)
        hose.config_table = pci_solidcard3_config_table;
        pci_405gp_init(&hose);
 }
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
index 038d4799535393c5c22b6967a7e222914d7919d4..0b11caaae2dbe01ce41adbf1aadff70f73eeb23b 100644 (file)
@@ -25,6 +25,7 @@
 #include <common.h>
 #include <pci.h>
 #include <ssi.h>
+#include <netdev.h>
 #include <asm/io.h>
 #include <asm/pci.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) :
        mw_eeprom_write(1, offset, buffer, len);
 }
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
index 2b789d47415dc6dea84f17e64e27c59cb6cb2237..e4fb1465fac95fc0bec7700f8d9e8f925411cab4 100644 (file)
@@ -26,6 +26,7 @@
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <pci.h>
+#include <netdev.h>
 
 phys_size_t initdram (int board_type)
 {
@@ -58,3 +59,8 @@ void pci_init_board (void)
        pci_mpc8220_init (&hose);
 #endif /* CONFIG_PCI */
 }
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
index a0ec254cedde7c26a71640409a224408b56fb219..3a2376c3f94b8aa413ea539f32d38cfc288e752e 100644 (file)
@@ -26,6 +26,7 @@
 #include <mpc8260.h>
 
 #include <command.h>
+#include <netdev.h>
 #ifdef CONFIG_PCI
 #include <pci.h>
 #include <asm/m8260_pci.h>
@@ -1226,3 +1227,8 @@ void pci_init_board(void)
        pci_mpc8250_init(&hose);
 }
 #endif
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
index ae3c2456fbcbfd4dca54d2d4347c797cec107f03..0e5bc2f730153406b30234c55f9ab252e1a4a579 100644 (file)
@@ -42,6 +42,7 @@
 #include <flash.h>
 #include <libfdt.h>
 #include <fdt_support.h>
+#include <netdev.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -743,3 +744,9 @@ int board_early_init_r (void)
        return (0);
 }
 #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);
+}
index e2a961a3a3f2bbdc93ffb0dde5dda8136c13b2eb..e7ca669c14f3e18bcd07723611b57c6694caece6 100644 (file)
@@ -32,6 +32,7 @@
 #include <asm/io.h>
 #include <asm/mmu.h>
 #include <pci.h>
+#include <netdev.h>
 
 #define        SAVE_SZ 32
 
@@ -127,3 +128,8 @@ void pci_init_board (void)
 
        icache_enable();
 }
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
index 9de0fb5e46c2c46969d017a05b7bb1b9a9382125..d6539c01aa9ef22cb116f3e375c07d2bdfab6bce 100644 (file)
@@ -24,6 +24,7 @@
 #include <common.h>
 #include <malloc.h>
 #include <net.h>
+#include <netdev.h>
 #include <asm/io.h>
 #include <pci.h>
 #include <miiphy.h>
index d8d1209dffb81d72061bef2e7b0ff6621716b9ee..8b181f77e11083fab912315b48b55b071010fd64 100644 (file)
@@ -44,6 +44,7 @@ int cpu_eth_init(bd_t *bis);
 int bfin_EMAC_initialize(bd_t *bis);
 int dc21x4x_initialize(bd_t *bis);
 int e1000_initialize(bd_t *bis);
+int eepro100_initialize(bd_t *bis);
 int eth_3com_initialize (bd_t * bis);
 int greth_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;
 
+#ifdef CONFIG_PCI
+
+#ifdef CONFIG_EEPRO100
+       num += eepro100_initialize(bis);
+#endif
 #ifdef CONFIG_TULIP
        num += dc21x4x_initialize(bis);
 #endif
@@ -95,6 +101,8 @@ static inline int pci_eth_init(bd_t *bis)
 #if defined(CONFIG_ULI526)
        num += uli526x_initialize(bis);
 #endif
+
+#endif  /* CONFIG_PCI */
        return num;
 }
 
index ab37bc233a084c4999f169a3b3e3fe26ecbaf990..432dd60bdc8f56c7db9d77853f6a34f61b987749 100644 (file)
--- a/net/eth.c
+++ b/net/eth.c
@@ -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")));
 
 extern int au1x00_enet_initialize(bd_t*);
-extern int eepro100_initialize(bd_t*);
 extern int fec_initialize(bd_t*);
 extern int mpc8220_fec_initialize(bd_t*);
 extern int mv6436x_eth_initialize(bd_t *);
@@ -190,9 +189,6 @@ int eth_initialize(bd_t *bis)
 #endif
 #if defined(CONFIG_IXP4XX_NPE)
        npe_initialize(bis);
-#endif
-#ifdef CONFIG_EEPRO100
-       eepro100_initialize(bis);
 #endif
        if (!eth_devices) {
                puts ("No ethernet found.\n");