From: Ben Warren Date: Thu, 3 Jul 2008 00:07:22 -0700 Subject: [U-Boot-Users] [PATCH 1/2] Moved initialization of FSL_MCDMAFEC Ethernet driver to CPU directory In-Reply-To: <1215068843-5373-1-git-send-email-biggerbadderben@gmail.com> References: <> <1215068843-5373-1-git-send-email-biggerbadderben@gmail.com> Message-ID: <1215068843-5373-2-git-send-email-biggerbadderben@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Added a cpu_eth_init() function to cpu/mcf547x_8x directory and removed code from net/eth.c Signed-off-by: Ben Warren --- cpu/mcf547x_8x/cpu.c | 9 +++++++++ drivers/net/fsl_mcdmafec.c | 2 +- net/eth.c | 4 ---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/cpu/mcf547x_8x/cpu.c b/cpu/mcf547x_8x/cpu.c index 528bca6..e29b45c 100644 --- a/cpu/mcf547x_8x/cpu.c +++ b/cpu/mcf547x_8x/cpu.c @@ -141,3 +141,12 @@ int watchdog_init(void) return (0); } #endif /* CONFIG_HW_WATCHDOG */ + +#if defined(CONFIG_FSLDMAFEC) +extern int mcdmafec_initialize(bd_t *bis); + +int cpu_eth_init(bd_t *bis) +{ + return mcdmafec_initialize(bis); +} +#endif diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c index f2bdba6..e34975a 100644 --- a/drivers/net/fsl_mcdmafec.c +++ b/drivers/net/fsl_mcdmafec.c @@ -582,5 +582,5 @@ int mcdmafec_initialize(bd_t * bis) /* default speed */ bis->bi_ethspeed = 10; - return 1; + return 0; } diff --git a/net/eth.c b/net/eth.c index 7fc9aee..40bbed4 100644 --- a/net/eth.c +++ b/net/eth.c @@ -73,7 +73,6 @@ extern int atstk1000_eth_initialize(bd_t *); extern int greth_initialize(bd_t *); extern int atngw100_eth_initialize(bd_t *); extern int mcffec_initialize(bd_t*); -extern int mcdmafec_initialize(bd_t*); extern int at91sam9_eth_initialize(bd_t *); #ifdef CONFIG_API @@ -283,9 +282,6 @@ int eth_initialize(bd_t *bis) #if defined(CONFIG_MCFFEC) mcffec_initialize(bis); #endif -#if defined(CONFIG_FSLDMAFEC) - mcdmafec_initialize(bis); -#endif #if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \ defined(CONFIG_AT91SAM9263) at91sam9_eth_initialize(bis); -- 1.5.4.3