Skip to content

Commit

Permalink
Convert SMC91111 Ethernet driver to CONFIG_NET_MULTI API
Browse files Browse the repository at this point in the history
All in-tree boards that use this controller have CONFIG_NET_MULTI
added
Also:
  - changed CONFIG_DRIVER_SMC91111 to CONFIG_SMC91111
  - cleaned up line lengths
  - modified all boards that override weak function in this driver
  - modified all eeprom standalone apps to work with new driver
  - updated blackfin standalone EEPROM app after testing

Signed-off-by: Ben Warren <[email protected]>
Signed-off-by: Mike Frysinger <[email protected]>
  • Loading branch information
ben-skyportsystems committed Oct 5, 2009
1 parent 32e7f23 commit 7194ab8
Show file tree
Hide file tree
Showing 71 changed files with 849 additions and 639 deletions.
12 changes: 12 additions & 0 deletions board/altera/ep1c20/ep1c20.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
*/

#include <common.h>
#include <netdev.h>

int board_early_init_f (void)
{
Expand All @@ -38,3 +39,14 @@ phys_size_t initdram (int board_type)
{
return (0);
}

#ifdef CONFIG_CMD_NET
int board_eth_init(bd_t *bis)
{
int rc = 0;
#ifdef CONFIG_SMC91111
rc = smc91111_initialize(0, CONFIG_SMC91111_BASE);
#endif
return rc;
}
#endif
12 changes: 12 additions & 0 deletions board/altera/ep1s10/ep1s10.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
*/

#include <common.h>
#include <netdev.h>

int board_early_init_f (void)
{
Expand All @@ -38,3 +39,14 @@ phys_size_t initdram (int board_type)
{
return (0);
}

#ifdef CONFIG_CMD_NET
int board_eth_init(bd_t *bis)
{
int rc = 0;
#ifdef CONFIG_SMC91111
rc = smc91111_initialize(0, CONFIG_SMC91111_BASE);
#endif
return rc;
}
#endif
12 changes: 12 additions & 0 deletions board/altera/ep1s40/ep1s40.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
*/

#include <common.h>
#include <netdev.h>

int checkboard (void)
{
Expand All @@ -33,3 +34,14 @@ phys_size_t initdram (int board_type)
{
return (0);
}

#ifdef CONFIG_CMD_NET
int board_eth_init(bd_t *bis)
{
int rc = 0;
#ifdef CONFIG_SMC91111
rc = smc91111_initialize(0, CONFIG_SMC91111_BASE);
#endif
return rc;
}
#endif
13 changes: 9 additions & 4 deletions board/armltd/integrator/integrator.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@
*/

#include <common.h>
#ifdef CONFIG_PCI
#include <netdev.h>
#endif

DECLARE_GLOBAL_DATA_PTR;

Expand Down Expand Up @@ -127,9 +125,16 @@ extern void dram_query(void);
return 0;
}

#ifdef CONFIG_PCI
#ifdef CONFIG_CMD_NET
int board_eth_init(bd_t *bis)
{
return pci_eth_init(bis);
int rc = 0;
#ifdef CONFIG_SMC91111
rc = smc91111_initialize(0, CONFIG_SMC91111_BASE);
#endif
#ifdef CONFIG_PCI
rc += pci_eth_init(bis);
#endif
return rc;
}
#endif
12 changes: 12 additions & 0 deletions board/armltd/versatile/versatile.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
*/

#include <common.h>
#include <netdev.h>

DECLARE_GLOBAL_DATA_PTR;

Expand Down Expand Up @@ -89,3 +90,14 @@ int dram_init (void)
{
return 0;
}

#ifdef CONFIG_CMD_NET
int board_eth_init(bd_t *bis)
{
int rc = 0;
#ifdef CONFIG_SMC91111
rc = smc91111_initialize(0, CONFIG_SMC91111_BASE);
#endif
return rc;
}
#endif
8 changes: 8 additions & 0 deletions board/bf533-ezkit/bf533-ezkit.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
*/

#include <common.h>
#include <netdev.h>
#include "psd4256.h"
#include "flash-defines.h"

Expand Down Expand Up @@ -57,3 +58,10 @@ int misc_init_r(void)

return 0;
}

#ifdef CONFIG_SMC91111
int board_eth_init(bd_t *bis)
{
return smc91111_initialize(0, CONFIG_SMC91111_BASE);
}
#endif
8 changes: 8 additions & 0 deletions board/bf533-stamp/bf533-stamp.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
*/

#include <common.h>
#include <netdev.h>
#include <asm/io.h>
#include "bf533-stamp.h"

Expand Down Expand Up @@ -283,3 +284,10 @@ void __led_toggle(led_id_t mask)
}

#endif

#ifdef CONFIG_SMC91111
int board_eth_init(bd_t *bis)
{
return smc91111_initialize(0, CONFIG_SMC91111_BASE);
}
#endif
8 changes: 8 additions & 0 deletions board/bf538f-ezkit/bf538f-ezkit.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/

#include <common.h>
#include <netdev.h>
#include <config.h>
#include <asm/blackfin.h>

Expand All @@ -25,3 +26,10 @@ phys_size_t initdram(int board_type)
gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
return gd->bd->bi_memsize;
}

#ifdef CONFIG_SMC91111
int board_eth_init(bd_t *bis)
{
return smc91111_initialize(0, CONFIG_SMC91111_BASE);
}
#endif
8 changes: 8 additions & 0 deletions board/bf561-ezkit/bf561-ezkit.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
*/

#include <common.h>
#include <netdev.h>
#include <asm/io.h>

DECLARE_GLOBAL_DATA_PTR;
Expand All @@ -43,3 +44,10 @@ phys_size_t initdram(int board_type)
gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
return gd->bd->bi_memsize;
}

#ifdef CONFIG_SMC91111
int board_eth_init(bd_t *bis)
{
return smc91111_initialize(0, CONFIG_SMC91111_BASE);
}
#endif
8 changes: 8 additions & 0 deletions board/blackstamp/blackstamp.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*/

#include <common.h>
#include <netdev.h>
#include <asm/io.h>

DECLARE_GLOBAL_DATA_PTR;
Expand Down Expand Up @@ -44,3 +45,10 @@ void swap_to(int device_id)
SSYNC();
}
#endif

#ifdef CONFIG_SMC91111
int board_eth_init(bd_t *bis)
{
return smc91111_initialize(0, CONFIG_SMC91111_BASE);
}
#endif
12 changes: 12 additions & 0 deletions board/cerf250/cerf250.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
*/

#include <common.h>
#include <netdev.h>

DECLARE_GLOBAL_DATA_PTR;

Expand Down Expand Up @@ -71,3 +72,14 @@ int dram_init (void)

return 0;
}

#ifdef CONFIG_CMD_NET
int board_eth_init(bd_t *bis)
{
int rc = 0;
#ifdef CONFIG_SMC91111
rc = smc91111_initialize(0, CONFIG_SMC91111_BASE);
#endif
return rc;
}
#endif
8 changes: 8 additions & 0 deletions board/cm-bf533/cm-bf533.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/

#include <common.h>
#include <netdev.h>

DECLARE_GLOBAL_DATA_PTR;

Expand All @@ -23,3 +24,10 @@ phys_size_t initdram(int board_type)
gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
return gd->bd->bi_memsize;
}

#ifdef CONFIG_SMC91111
int board_eth_init(bd_t *bis)
{
return smc91111_initialize(0, CONFIG_SMC91111_BASE);
}
#endif
8 changes: 8 additions & 0 deletions board/cm-bf561/cm-bf561.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/

#include <common.h>
#include <netdev.h>

DECLARE_GLOBAL_DATA_PTR;

Expand All @@ -23,3 +24,10 @@ phys_size_t initdram(int board_type)
gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
return gd->bd->bi_memsize;
}

#ifdef CONFIG_SMC91111
int board_eth_init(bd_t *bis)
{
return smc91111_initialize(0, CONFIG_SMC91111_BASE);
}
#endif
12 changes: 12 additions & 0 deletions board/cradle/cradle.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include <asm/arch/pxa-regs.h>
#include <common.h>
#include <netdev.h>

DECLARE_GLOBAL_DATA_PTR;

Expand Down Expand Up @@ -223,3 +224,14 @@ dram_init (void)
PHYS_SDRAM_3_SIZE +
PHYS_SDRAM_4_SIZE );
}

#ifdef CONFIG_CMD_NET
int board_eth_init(bd_t *bis)
{
int rc = 0;
#ifdef CONFIG_SMC91111
rc = smc91111_initialize(0, CONFIG_SMC91111_BASE);
#endif
return rc;
}
#endif
12 changes: 12 additions & 0 deletions board/delta/delta.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
*/

#include <common.h>
#include <netdev.h>
#include <i2c.h>
#include <da9030.h>
#include <malloc.h>
Expand Down Expand Up @@ -363,3 +364,14 @@ void hw_watchdog_reset(void)
i2c_reg_write(addr, SYS_CONTROL_A, val);
}
#endif

#ifdef CONFIG_CMD_NET
int board_eth_init(bd_t *bis)
{
int rc = 0;
#ifdef CONFIG_SMC91111
rc = smc91111_initialize(0, CONFIG_SMC91111_BASE);
#endif
return rc;
}
#endif
12 changes: 12 additions & 0 deletions board/dnp1110/dnp1110.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/

#include <common.h>
#include <netdev.h>
#include <SA-1100.h>

DECLARE_GLOBAL_DATA_PTR;
Expand Down Expand Up @@ -53,3 +54,14 @@ int dram_init (void)

return (0);
}

#ifdef CONFIG_CMD_NET
int board_eth_init(bd_t *bis)
{
int rc = 0;
#ifdef CONFIG_SMC91111
rc = smc91111_initialize(0, CONFIG_SMC91111_BASE);
#endif
return rc;
}
#endif
12 changes: 12 additions & 0 deletions board/gaisler/gr_cpci_ax2000/gr_cpci_ax2000.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
*/

#include <common.h>
#include <netdev.h>
#include <config.h>
#include <asm/leon.h>

Expand All @@ -37,3 +38,14 @@ int misc_init_r(void)
{
return 0;
}

#ifdef CONFIG_CMD_NET
int board_eth_init(bd_t *bis)
{
int rc = 0;
#ifdef CONFIG_SMC91111
rc = smc91111_initialize(0, CONFIG_SMC91111_BASE);
#endif
return rc;
}
#endif
12 changes: 12 additions & 0 deletions board/gaisler/gr_ep2s60/gr_ep2s60.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
*/

#include <common.h>
#include <netdev.h>
#include <config.h>
#include <asm/leon.h>

Expand All @@ -37,3 +38,14 @@ int misc_init_r(void)
{
return 0;
}

#ifdef CONFIG_CMD_NET
int board_eth_init(bd_t *bis)
{
int rc = 0;
#ifdef CONFIG_SMC91111
rc = smc91111_initialize(0, CONFIG_SMC91111_BASE);
#endif
return rc;
}
#endif
Loading

0 comments on commit 7194ab8

Please sign in to comment.