From 8453587ef9137daf98b7c9cf4f3b865f4039cea0 Mon Sep 17 00:00:00 2001 From: Ben Warren Date: Tue, 26 May 2009 00:34:07 -0700 Subject: Switched davinci_emac Ethernet driver to use newer API Added CONFIG_NET_MULTI to all Davinci boards Removed all calls to Davinci network driver from board code Added cpu_eth_init() to cpu/arm926ejs/cpu.c Signed-off-by: Ben Warren --- board/davinci/common/misc.h | 1 - board/davinci/dvevm/dvevm.c | 3 --- board/davinci/schmoogie/schmoogie.c | 3 --- board/davinci/sffsdr/sffsdr.c | 3 --- board/davinci/sonata/sonata.c | 3 --- 5 files changed, 13 deletions(-) (limited to 'board') diff --git a/board/davinci/common/misc.h b/board/davinci/common/misc.h index 316159a2f7..dc3cc41330 100644 --- a/board/davinci/common/misc.h +++ b/board/davinci/common/misc.h @@ -22,7 +22,6 @@ #ifndef __MISC_H #define __MISC_H -extern int eth_hw_init(void); int dvevm_read_mac_address(uint8_t *buf); void dv_configure_mac_address(uint8_t *rom_enetaddr); diff --git a/board/davinci/dvevm/dvevm.c b/board/davinci/dvevm/dvevm.c index 8f386331e6..98937a9620 100644 --- a/board/davinci/dvevm/dvevm.c +++ b/board/davinci/dvevm/dvevm.c @@ -73,9 +73,6 @@ int misc_init_r(void) if (dvevm_read_mac_address(eeprom_enetaddr)) dv_configure_mac_address(eeprom_enetaddr); - if (!eth_hw_init()) - printf("ethernet init failed!\n"); - i2c_read(0x39, 0x00, 1, &video_mode, 1); setenv("videostd", ((video_mode & 0x80) ? "pal" : "ntsc")); diff --git a/board/davinci/schmoogie/schmoogie.c b/board/davinci/schmoogie/schmoogie.c index 6e0f591335..19c95809aa 100644 --- a/board/davinci/schmoogie/schmoogie.c +++ b/board/davinci/schmoogie/schmoogie.c @@ -130,8 +130,5 @@ int misc_init_r(void) forceenv("serial#", (char *)&tmp[0]); } - if (!eth_hw_init()) - printf("ethernet init failed!\n"); - return(0); } diff --git a/board/davinci/sffsdr/sffsdr.c b/board/davinci/sffsdr/sffsdr.c index 7f4ee361bb..c24b9e188c 100644 --- a/board/davinci/sffsdr/sffsdr.c +++ b/board/davinci/sffsdr/sffsdr.c @@ -143,8 +143,5 @@ int misc_init_r(void) if (sffsdr_read_mac_address(eeprom_enetaddr)) dv_configure_mac_address(eeprom_enetaddr); - if (!eth_hw_init()) - printf("Ethernet init failed\n"); - return(0); } diff --git a/board/davinci/sonata/sonata.c b/board/davinci/sonata/sonata.c index a0bea05177..7f9d9bba3d 100644 --- a/board/davinci/sonata/sonata.c +++ b/board/davinci/sonata/sonata.c @@ -70,8 +70,5 @@ int misc_init_r(void) if (dvevm_read_mac_address(eeprom_enetaddr)) dv_configure_mac_address(eeprom_enetaddr); - if (!eth_hw_init()) - printf("ethernet init failed!\n"); - return(0); } -- cgit From 60f61e6d7655400bb785a2ef637581679941f6d1 Mon Sep 17 00:00:00 2001 From: Remy Bohmer Date: Sat, 2 May 2009 21:49:18 +0200 Subject: Convert DM9000 driver for CONFIG_NET_MULTI All drivers need to be converted to CONFIG_NET_MULTI. This patch converts the dm9000 driver. Signed-off-by: Thomas Smits Signed-off-by: Remy Bohmer Signed-off-by: Ben Warren --- board/atmel/at91sam9261ek/at91sam9261ek.c | 7 +++++++ board/freescale/m5253demo/m5253demo.c | 9 +++++++++ board/scb9328/scb9328.c | 8 ++++++++ board/trizepsiv/conxs.c | 8 ++++++++ 4 files changed, 32 insertions(+) (limited to 'board') diff --git a/board/atmel/at91sam9261ek/at91sam9261ek.c b/board/atmel/at91sam9261ek/at91sam9261ek.c index a89cb8bf27..0817e60154 100644 --- a/board/atmel/at91sam9261ek/at91sam9261ek.c +++ b/board/atmel/at91sam9261ek/at91sam9261ek.c @@ -36,6 +36,7 @@ #include #if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_DRIVER_DM9000) #include +#include #endif DECLARE_GLOBAL_DATA_PTR; @@ -227,6 +228,12 @@ int board_init(void) return 0; } +#ifdef CONFIG_DRIVER_DM9000 + int board_eth_init(bd_t *bis) + { + return dm9000_initialize(bis); + } + #endif int dram_init(void) { gd->bd->bi_dram[0].start = PHYS_SDRAM; diff --git a/board/freescale/m5253demo/m5253demo.c b/board/freescale/m5253demo/m5253demo.c index b39cd4d7a5..4772074d81 100644 --- a/board/freescale/m5253demo/m5253demo.c +++ b/board/freescale/m5253demo/m5253demo.c @@ -26,6 +26,7 @@ #include #include +#include int checkboard(void) { @@ -138,3 +139,11 @@ void ide_set_reset(int idereset) } } #endif /* CONFIG_CMD_IDE */ + + +#ifdef CONFIG_DRIVER_DM9000 +int board_eth_init(bd_t *bis) +{ + return dm9000_initialize(bis); +} +#endif diff --git a/board/scb9328/scb9328.c b/board/scb9328/scb9328.c index 3f6831be5e..428e8c9e1c 100644 --- a/board/scb9328/scb9328.c +++ b/board/scb9328/scb9328.c @@ -19,6 +19,7 @@ */ #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -70,3 +71,10 @@ void show_boot_progress (int status) { return; } + +#ifdef CONFIG_DRIVER_DM9000 +int board_eth_init(bd_t *bis) +{ + return dm9000_initialize(bis); +} +#endif diff --git a/board/trizepsiv/conxs.c b/board/trizepsiv/conxs.c index 7c6c855007..5c0eb41d4b 100644 --- a/board/trizepsiv/conxs.c +++ b/board/trizepsiv/conxs.c @@ -33,6 +33,7 @@ #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -144,3 +145,10 @@ int dram_init (void) return 0; } + +#ifdef CONFIG_DRIVER_DM9000 +int board_eth_init(bd_t *bis) +{ + return dm9000_initialize(bis); +} +#endif -- cgit