From: Ben Warren Date: Wed, 9 Jul 2008 08:04:19 +0000 (-0700) Subject: Moved initialization of GRETH Ethernet driver to CPU directory X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=fc363ce35408f348cacced68505f3747a53e3d7c;p=u-boot.git Moved initialization of GRETH Ethernet driver to CPU directory Added a cpu_eth_init() function to leon2/leon3 CPU directories and removed code from net/eth.c Signed-off-by: Ben Warren --- diff --git a/cpu/leon2/cpu.c b/cpu/leon2/cpu.c index 1c1e24b16c..5de1c521aa 100644 --- a/cpu/leon2/cpu.c +++ b/cpu/leon2/cpu.c @@ -56,3 +56,12 @@ int do_reset(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) } /* ------------------------------------------------------------------------- */ + +extern int greth_initialize(bd_t *bis); + +#ifdef CONFIG_GRETH +int cpu_eth_init(bd_t *bis) +{ + return greth_initialize(bis); +} +#endif diff --git a/cpu/leon3/cpu.c b/cpu/leon3/cpu.c index 306a210048..1725fdb090 100644 --- a/cpu/leon3/cpu.c +++ b/cpu/leon3/cpu.c @@ -65,3 +65,11 @@ u64 flash_read64(void *addr) } /* ------------------------------------------------------------------------- */ +extern int greth_initialize(bd_t *bis); + +#ifdef CONFIG_GRETH +int cpu_eth_init(bd_t *bis) +{ + return greth_initialize(bis); +} +#endif diff --git a/drivers/net/greth.c b/drivers/net/greth.c index 76ece59b36..90c5338837 100644 --- a/drivers/net/greth.c +++ b/drivers/net/greth.c @@ -657,5 +657,5 @@ int greth_initialize(bd_t * bis) /* set and remember MAC address */ greth_set_hwaddr(greth, addr); - return 1; + return 0; } diff --git a/net/eth.c b/net/eth.c index 50bea796ac..c40a19ce2e 100644 --- a/net/eth.c +++ b/net/eth.c @@ -69,7 +69,6 @@ extern int uli526x_initialize(bd_t *); extern int npe_initialize(bd_t *); extern int uec_initialize(int); extern int bfin_EMAC_initialize(bd_t *); -extern int greth_initialize(bd_t *); extern int at91sam9_eth_initialize(bd_t *); #ifdef CONFIG_API @@ -267,9 +266,6 @@ int eth_initialize(bd_t *bis) #if defined(CONFIG_BF537) bfin_EMAC_initialize(bis); #endif -#if defined(CONFIG_GRETH) - greth_initialize(bis); -#endif #if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \ defined(CONFIG_AT91SAM9263) at91sam9_eth_initialize(bis);