mv643xx_eth: use auto phy polling for configuring (R)(G)MII interface
authorLennert Buytenhek <buytenh@wantstofly.org>
Mon, 14 Jul 2008 12:29:40 +0000 (14:29 +0200)
committerLennert Buytenhek <buytenh@marvell.com>
Thu, 24 Jul 2008 04:22:59 +0000 (06:22 +0200)
commit81600eea98789da09a32de69ca9d3be8b9503c54
treeba607eed9bfff70d4f40c3b25baf1bc83ea90024
parent7dde154d3d0d9701ecfb5533017a8f1a20bb4214
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>
arch/arm/mach-kirkwood/rd88f6281-setup.c
arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
arch/arm/mach-orion5x/wnr854t-setup.c
arch/arm/mach-orion5x/wrt350n-v2-setup.c
drivers/net/mv643xx_eth.c