mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-28 01:51:33 +00:00
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>
This commit is contained in:
parent
9baefa465d
commit
f7542638c7
1 changed files with 6 additions and 4 deletions
|
@ -209,9 +209,13 @@ void enable_caches(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(CONFIG_FEC_MXC)
|
||||||
|
/*
|
||||||
|
* Initializes on-chip ethernet controllers.
|
||||||
|
* to override, implement board_eth_init()
|
||||||
|
*/
|
||||||
int cpu_eth_init(bd_t *bis)
|
int cpu_eth_init(bd_t *bis)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_FEC_MXC)
|
|
||||||
struct ccm_regs *ccm = (struct ccm_regs *)IMX_CCM_BASE;
|
struct ccm_regs *ccm = (struct ccm_regs *)IMX_CCM_BASE;
|
||||||
ulong val;
|
ulong val;
|
||||||
|
|
||||||
|
@ -219,10 +223,8 @@ int cpu_eth_init(bd_t *bis)
|
||||||
val |= (1 << 23);
|
val |= (1 << 23);
|
||||||
writel(val, &ccm->cgr0);
|
writel(val, &ccm->cgr0);
|
||||||
return fecmxc_initialize(bis);
|
return fecmxc_initialize(bis);
|
||||||
#else
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int get_clocks(void)
|
int get_clocks(void)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue