i.MX28: unbreak ethernet
since the switch to common clock, ethernet driver doesn't works and
and access to the network leads to :
eth0: Read MDIO failed...
unable to handle NULL pointer dereference at address 0x000000c7

The problem is that bit 31 (SLEEP) of register HW_CLKCTRL_ENET is kept
to its default value (1) which means : "put Ethernet block in sleep mode.
CLK_H_MAC0(1), CLK_H_MAC0(1)_S, and CLK_ENET0(1)_TX are gated off.
Ethernet can be wakeup remotely in sleep mode"
In that case the FEC don't get its clock.

This patch fix the problem by toggling this bit when FEC's clock is
enabled.

Tested on i.MX28EVK.

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 6318cfb commit bf04eedf69d8842f0ba1e88bebce214d84cd8c04
@Eric Bénard Eric Bénard authored on 10 Sep 2013
Sascha Hauer committed on 10 Sep 2013
Showing 1 changed file
View
drivers/clk/mxs/clk-imx28.c