summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorBenoît Thébaudeau <benoit.thebaudeau@advansee.com>2012-09-27 10:28:09 +0000
committerTom Rini <trini@ti.com>2012-10-15 11:54:13 -0700
commitf7542638c7ad3e2b98163f4b95a6d6f268c13a8b (patch)
tree8e5fbbf7b6aecfebee99b66a30d14346757cdb92 /arch
parent9baefa465d213330368b5cefcda3d5926351faa4 (diff)
downloadu-boot-imx-f7542638c7ad3e2b98163f4b95a6d6f268c13a8b.zip
u-boot-imx-f7542638c7ad3e2b98163f4b95a6d6f268c13a8b.tar.gz
u-boot-imx-f7542638c7ad3e2b98163f4b95a6d6f268c13a8b.tar.bz2
mx25: Define cpu_eth_init() only if needed
The FEC is the only SoC Ethernet support available on i.MX25, so define cpu_eth_init() only for it instead of returning a misleading success code. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Cc: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/cpu/arm926ejs/mx25/generic.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/arm/cpu/arm926ejs/mx25/generic.c b/arch/arm/cpu/arm926ejs/mx25/generic.c
index e3b3d50..7cfa66f 100644
--- a/arch/arm/cpu/arm926ejs/mx25/generic.c
+++ b/arch/arm/cpu/arm926ejs/mx25/generic.c
@@ -209,9 +209,13 @@ void enable_caches(void)
#endif
}
+#if defined(CONFIG_FEC_MXC)
+/*
+ * Initializes on-chip ethernet controllers.
+ * to override, implement board_eth_init()
+ */
int cpu_eth_init(bd_t *bis)
{
-#if defined(CONFIG_FEC_MXC)
struct ccm_regs *ccm = (struct ccm_regs *)IMX_CCM_BASE;
ulong val;
@@ -219,10 +223,8 @@ int cpu_eth_init(bd_t *bis)
val |= (1 << 23);
writel(val, &ccm->cgr0);
return fecmxc_initialize(bis);
-#else
- return 0;
-#endif
}
+#endif
int get_clocks(void)
{