diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-27 19:19:22 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-27 19:19:22 -0500 |
commit | f1dd6ad599732fc89f36fdd65a2c2cf3c63a8711 (patch) | |
tree | 5092207128e47cba99dc0fe373fff6a36f4cb4b8 /drivers/net/cpmac.c | |
parent | 8d37a371b6869920e6c40c495c68eabba1ef3909 (diff) | |
parent | e10b234b3c4e255d3300a486c4ac15b43253ac6d (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (141 commits)
MIPS: Alchemy: defconfig updates
MIPS: Alchemy: Fix Au1100 ethernet build failure
MIPS: Alchemy: Repair db1500/bosporus builds
MIPS: ARC: Cleanup unused definitions from sgialib.h
MIPS: Cobalt: convert legacy port addresses to GT-64111 bus addresses
MIPS: Alchemy: use 36bit addresses for PCMCIA resources.
MIPS: Cobalt: Fix theoretical port aliasing issue
MIPS: Use ALIGN(x, bytes) instead of __ALIGN_MASK(x, bytes - 1)
MIPS: Crazy spinlock speed test.
MIPS: Optimize spinlocks.
MIPS: Alchemy: devboard PM needs to save CPLD registers.
MIPS: PowerTV: Eliminate duplicate opcode definition macros
MIPS: Lemote 2F: Move printks out of port_access_lock.
MIPS: PNX833x: Convert IRQ controller locks to raw spinlocks.
MIPS: Octeon: Replace spinlock with raw_spinlocks in dma-octeon.c.
MIPS: Octeon: Replace rwlocks in irq_chip handlers with raw_spinlocks.
MIPS: Octeon: Convert octeon_irq_msi_lock to raw spinlock.
MIPS: Loongson: Remove pointless sample_lock from oprofile code.
MIPS: SNI: Convert sni_rm200_i8259A_lock to raw spinlock.
MIPS: i8259: Convert IRQ controller lock to raw spinlock.
...
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 8d0be26f94e3..bf2072e54200 100644 --- a/drivers/net/cpmac.c +++ b/drivers/net/cpmac.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/phy_fixed.h> | 36 | #include <linux/phy_fixed.h> |
37 | #include <linux/platform_device.h> | 37 | #include <linux/platform_device.h> |
38 | #include <linux/dma-mapping.h> | 38 | #include <linux/dma-mapping.h> |
39 | #include <linux/clk.h> | ||
39 | #include <asm/gpio.h> | 40 | #include <asm/gpio.h> |
40 | #include <asm/atomic.h> | 41 | #include <asm/atomic.h> |
41 | 42 | ||
@@ -294,9 +295,16 @@ static int cpmac_mdio_write(struct mii_bus *bus, int phy_id, | |||
294 | 295 | ||
295 | static int cpmac_mdio_reset(struct mii_bus *bus) | 296 | static int cpmac_mdio_reset(struct mii_bus *bus) |
296 | { | 297 | { |
298 | struct clk *cpmac_clk; | ||
299 | |||
300 | cpmac_clk = clk_get(&bus->dev, "cpmac"); | ||
301 | if (IS_ERR(cpmac_clk)) { | ||
302 | printk(KERN_ERR "unable to get cpmac clock\n"); | ||
303 | return -1; | ||
304 | } | ||
297 | ar7_device_reset(AR7_RESET_BIT_MDIO); | 305 | ar7_device_reset(AR7_RESET_BIT_MDIO); |
298 | cpmac_write(bus->priv, CPMAC_MDIO_CONTROL, MDIOC_ENABLE | | 306 | cpmac_write(bus->priv, CPMAC_MDIO_CONTROL, MDIOC_ENABLE | |
299 | MDIOC_CLKDIV(ar7_cpmac_freq() / 2200000 - 1)); | 307 | MDIOC_CLKDIV(clk_get_rate(cpmac_clk) / 2200000 - 1)); |
300 | return 0; | 308 | return 0; |
301 | } | 309 | } |
302 | 310 | ||