linux-mips
[Top] [All Lists]

RFC: new WIP version of au1000_eth.c phylib conversion (was Re: RFC: au1

To: Mark Schank <mschank@dcbnet.com>
Subject: RFC: new WIP version of au1000_eth.c phylib conversion (was Re: RFC: au1000_etc.c phylib rewrite)
From: Herbert Valerio Riedel <hvr@gnu.org>
Date: Thu, 04 May 2006 11:17:03 +0200
Cc: ppopov@embeddedalley.com, sshtylyov@ru.mvista.com, linux-mips@linux-mips.org, jgarzik@pobox.com, netdev@vger.kernel.org, Ralf Baechle <ralf@linux-mips.org>, "Robin H. Johnson" <robbat2@gentoo.org>
In-reply-to: <1146674056.31241.18.camel@localhost.localdomain>
Organization: Free Software Foundation
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <5.1.0.14.2.20060501144633.025e4e20@205.166.54.3> <1146510542.16643.10.camel@localhost.localdomain> <1146510542.16643.10.camel@localhost.localdomain> <5.1.0.14.2.20060501144633.025e4e20@205.166.54.3> <5.1.0.14.2.20060502095256.01fd4210@205.166.54.3> <1146674056.31241.18.camel@localhost.localdomain>
Sender: linux-mips-bounce@linux-mips.org
Hello,

I've tried to adapt the PHY detection code to allow for dynamic runtime
configuration (with fallback to search for the 2nd MAC PHY on the 1st
MAC's MII bus), as well as selectable static PHY configuration through
Kconfig (e.g. for supporting PHYs w/o MII connection)

e.g. for a MIPS BOSPORUS board, one would set something like through
Kconfig (haven't bothered yet, to autoselect this when MIPS_BOSPORUS is
defined):

CONFIG_MIPS_AU1X00_ENET=y
CONFIG_MIPS_AU1X00_ENET_STATIC_PHY_CONFIG=y
CONFIG_MIPS_AU1X00_ENET_ETH0_PHY_ADDR=5
CONFIG_MIPS_AU1X00_ENET_ETH1_PHY_ON_MAC0=y
CONFIG_MIPS_AU1X00_ENET_ETH1_PHY_ADDR=-1

the default dynamic runtime PHY search behaviour is now to find the
lowest phy_addr containing a living PHY (which is not already claimed by
another MAC) on the MAC's current MII bus, and if not found, try again
on the first MAC's MII bus; and if that also fails eth initialization
fails for the given MAC;

...well, if anyone has the time and hardware, testing would be greatly
welcomed :-)

alas, this patch is rather big and I'd like to split it into smaller
pieces, but imho it's an 'all or nothing' thing to convert to the PHY
lib... :-/

 Kconfig      |   31 +
 au1000_eth.c | 1494 ++++++++++-------------------------------------------------
 au1000_eth.h |  132 -----
 3 files changed, 310 insertions(+), 1347 deletions(-)

regards,
hvr

Attachment: au1000_eth_phylib_conversion.patch
Description: Text Data

Attachment: signature.asc
Description: This is a digitally signed message part

<Prev in Thread] Current Thread [Next in Thread>