diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2008-07-14 08:29:40 -0400 |
---|---|---|
committer | Lennert Buytenhek <buytenh@marvell.com> | 2008-07-24 00:22:59 -0400 |
commit | 81600eea98789da09a32de69ca9d3be8b9503c54 (patch) | |
tree | ba607eed9bfff70d4f40c3b25baf1bc83ea90024 /arch/arm/mach-orion5x/rd88f5181l-ge-setup.c | |
parent | 7dde154d3d0d9701ecfb5533017a8f1a20bb4214 (diff) |
mv643xx_eth: use auto phy polling for configuring (R)(G)MII interface
The mv643xx_eth hardware has a provision for polling the PHY's
MII management registers to obtain the (R)(G)MII interface speed
(10/100/1000) and duplex (half/full) and pause (off/symmetric)
settings to use to talk to the PHY.
The driver currently does not make use of this feature. Instead,
whenever there is a link status change event, it reads the current
link parameters from the PHY, and programs those parameters into
the mv643xx_eth MAC by hand.
This patch switches the mv643xx_eth driver to letting the MAC
auto-determine the (R)(G)MII link parameters by PHY polling, if there
is a PHY present. For PHYless ports (when e.g. the (R)(G)MII
interface is connected to a hardware switch), we keep hardcoding the
MII interface parameters.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Diffstat (limited to 'arch/arm/mach-orion5x/rd88f5181l-ge-setup.c')
-rw-r--r-- | arch/arm/mach-orion5x/rd88f5181l-ge-setup.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c index b56447d32e17..ac482019abbf 100644 --- a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c +++ b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/irq.h> | 15 | #include <linux/irq.h> |
16 | #include <linux/mtd/physmap.h> | 16 | #include <linux/mtd/physmap.h> |
17 | #include <linux/mv643xx_eth.h> | 17 | #include <linux/mv643xx_eth.h> |
18 | #include <linux/ethtool.h> | ||
18 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
19 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
20 | #include <asm/gpio.h> | 21 | #include <asm/gpio.h> |
@@ -89,6 +90,8 @@ static struct orion5x_mpp_mode rd88f5181l_ge_mpp_modes[] __initdata = { | |||
89 | 90 | ||
90 | static struct mv643xx_eth_platform_data rd88f5181l_ge_eth_data = { | 91 | static struct mv643xx_eth_platform_data rd88f5181l_ge_eth_data = { |
91 | .phy_addr = -1, | 92 | .phy_addr = -1, |
93 | .speed = SPEED_1000, | ||
94 | .duplex = DUPLEX_FULL, | ||
92 | }; | 95 | }; |
93 | 96 | ||
94 | static struct i2c_board_info __initdata rd88f5181l_ge_i2c_rtc = { | 97 | static struct i2c_board_info __initdata rd88f5181l_ge_i2c_rtc = { |