From 23b6527003ca6a12d7872e9e552160041d8b6285 Mon Sep 17 00:00:00 2001 From: Terry Lv Date: Wed, 24 Jun 2009 11:31:38 +0800 Subject: ENGR00113611: Add FEC support for BBG2. Add FEC support for BBG2. Signed-off-by: Terry Lv --- cpu/arm_cortexa8/mx51/generic.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'cpu') diff --git a/cpu/arm_cortexa8/mx51/generic.c b/cpu/arm_cortexa8/mx51/generic.c index ef8ef98..6f928f6 100644 --- a/cpu/arm_cortexa8/mx51/generic.c +++ b/cpu/arm_cortexa8/mx51/generic.c @@ -25,6 +25,7 @@ #include #include +#include #include "crm_regs.h" enum pll_clocks { @@ -203,6 +204,10 @@ unsigned int mxc_get_clock(enum mxc_clock clk) return __get_uart_clk(); case MXC_CSPI_CLK: return __get_cspi_clk(); + case MXC_FEC_CLK: + return __decode_pll(PLL1_CLK, CONFIG_MX51_HCLK_FREQ); + default: + break; } return -1; } @@ -233,3 +238,23 @@ int print_cpuinfo(void) return 0; } #endif + +/* + * Initializes on-chip ethernet controllers. + * to override, implement board_eth_init() + */ + #if defined(CONFIG_MXC_FEC) + extern int mxc_fec_initialize(bd_t *bis); + #endif + +int cpu_eth_init(bd_t *bis) +{ + int rc = -ENODEV; + +#if defined(CONFIG_MXC_FEC) + rc = mxc_fec_initialize(bis); +#endif + + return rc; +} + -- cgit v1.1