Commit d6c15bf3 authored by Dave Jones's avatar Dave Jones Committed by Jeff Garzik

[netdrvr au1100] update from 2.4.x

parent f637e75d
......@@ -122,9 +122,12 @@ static struct {
au1500_iflist[NUM_INTERFACES] = {
{AU1500_ETH0_BASE, AU1000_ETH0_IRQ},
{AU1500_ETH1_BASE, AU1000_ETH1_IRQ}
},
au1100_iflist[NUM_INTERFACES] = {
{AU1000_ETH0_BASE, AU1000_ETH0_IRQ},
{NULL, NULL}
};
static char version[] __devinitdata =
"au1000eth.c:1.0 ppopov@mvista.com\n";
......@@ -176,6 +179,11 @@ int bcm_5201_init(struct net_device *dev, int phy_addr)
data |= MII_CNTL_RST_AUTO | MII_CNTL_AUTO;
mdio_write(dev, phy_addr, MII_CONTROL, data);
/* Enable TX LED instead of FDX */
data = mdio_read(dev, phy_addr, MII_INT);
data &= ~MII_FDX_LED;
mdio_write(dev, phy_addr, MII_INT, data);
if (au1000_debug > 4) dump_mii(dev, phy_addr);
return 0;
}
......@@ -249,6 +257,8 @@ int lsi_80227_init(struct net_device *dev, int phy_addr)
/* restart auto-negotiation */
mdio_write(dev, phy_addr, 0, 0x3200);
mdelay(1);
/* set up LEDs to correct display */
mdio_write(dev, phy_addr, 17, 0xffc0);
......@@ -367,6 +377,7 @@ static struct mii_chip_info {
{"Broadcom BCM5201 10/100 BaseT PHY", 0x0040, 0x6212, &bcm_5201_ops },
{"AMD 79C901 HomePNA PHY", 0x0000, 0x35c8, &am79c901_ops },
{"LSI 80227 10/100 BaseT PHY", 0x0016, 0xf840, &lsi_80227_ops },
{"Broadcom BCM5221 10/100 BaseT PHY", 0x0040, 0x61e4, &bcm_5201_ops },
{0,},
};
......@@ -637,14 +648,20 @@ static int __init au1000_init_module(void)
} else if ( (prid & 0xffff0000) == 0x01030000 ) {
base_addr = au1500_iflist[i].port;
irq = au1500_iflist[i].irq;
} else if ( (prid & 0xffff0000) == 0x02030000 ) {
base_addr = au1100_iflist[i].port;
irq = au1100_iflist[i].irq;
} else {
printk(KERN_ERR "au1000 eth: unknown Processor ID\n");
return -ENODEV;
}
// check for valid entries, au1100 only has one entry
if (base_addr && irq) {
if (au1000_probe1(NULL, base_addr, irq, i) != 0) {
return -ENODEV;
}
}
}
return 0;
}
......
......@@ -39,7 +39,7 @@
#define ETH_TX_TIMEOUT HZ/4
#define MAC_MIN_PKT_SIZE 64
#if defined(CONFIG_MIPS_PB1000) || defined(CONFIG_MIPS_PB1500)
#if defined(CONFIG_MIPS_PB1000) || defined(CONFIG_MIPS_PB1500) || defined(CONFIG_MIPS_PB1100)
#define PHY_ADDRESS 0
#define PHY_CONTROL_DEFAULT 0x3000
#define PHY_CONTROL_REG_ADDR 0
......@@ -63,6 +63,7 @@
#define MII_LSI_CONFIG 0x0011
#define MII_LSI_STAT 0x0012
#define MII_AUX_CNTRL 0x0018
#define MII_INT 0x001A
/* mii registers specific to AMD 79C901 */
#define MII_STATUS_SUMMARY = 0x0018
......@@ -128,14 +129,15 @@
/* lsi status register */
#define MII_LSI_STAT_FDX 0x0008
#define MII_LSI_STAT_SPD 0x0010
#define MII_LSI_STAT_FDX 0x0040
#define MII_LSI_STAT_SPD 0x0080
/* Auxilliary Control/Status Register */
#define MII_AUX_FDX 0x0001
#define MII_AUX_100 0x0002
#define MII_AUX_F100 0x0004
#define MII_AUX_ANEG 0x0008
#define MII_FDX_LED 0x8000
typedef struct mii_phy {
struct mii_phy * next;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment