diff options
author | David S. Miller <davem@davemloft.net> | 2010-03-01 04:23:06 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-01 04:23:06 +0100 |
commit | 47871889c601d8199c51a4086f77eebd77c29b0b (patch) | |
tree | 40cdcac3bff0ee40cc33dcca61d0577cdf965f77 /drivers/net/cpmac.c | |
parent | bnx2x: Tx barriers and locks (diff) | |
parent | Merge branch 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/... (diff) | |
download | linux-47871889c601d8199c51a4086f77eebd77c29b0b.tar.xz linux-47871889c601d8199c51a4086f77eebd77c29b0b.zip |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts:
drivers/firmware/iscsi_ibft.c
Diffstat (limited to 'drivers/net/cpmac.c')
-rw-r--r-- | drivers/net/cpmac.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c index 0074f3bf17be..b85c81f60d10 100644 --- a/drivers/net/cpmac.c +++ b/drivers/net/cpmac.c @@ -36,6 +36,7 @@ #include <linux/phy_fixed.h> #include <linux/platform_device.h> #include <linux/dma-mapping.h> +#include <linux/clk.h> #include <asm/gpio.h> #include <asm/atomic.h> @@ -294,9 +295,16 @@ static int cpmac_mdio_write(struct mii_bus *bus, int phy_id, static int cpmac_mdio_reset(struct mii_bus *bus) { + struct clk *cpmac_clk; + + cpmac_clk = clk_get(&bus->dev, "cpmac"); + if (IS_ERR(cpmac_clk)) { + printk(KERN_ERR "unable to get cpmac clock\n"); + return -1; + } ar7_device_reset(AR7_RESET_BIT_MDIO); cpmac_write(bus->priv, CPMAC_MDIO_CONTROL, MDIOC_ENABLE | - MDIOC_CLKDIV(ar7_cpmac_freq() / 2200000 - 1)); + MDIOC_CLKDIV(clk_get_rate(cpmac_clk) / 2200000 - 1)); return 0; } |