Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
d6c15bf3
Commit
d6c15bf3
authored
Nov 27, 2002
by
Dave Jones
Committed by
Jeff Garzik
Nov 27, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[netdrvr au1100] update from 2.4.x
parent
f637e75d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
4 deletions
+23
-4
drivers/net/au1000_eth.c
drivers/net/au1000_eth.c
+18
-1
drivers/net/au1000_eth.h
drivers/net/au1000_eth.h
+5
-3
No files found.
drivers/net/au1000_eth.c
View file @
d6c15bf3
...
...
@@ -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
;
}
...
...
drivers/net/au1000_eth.h
View file @
d6c15bf3
...
...
@@ -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 0x00
08
#define MII_LSI_STAT_SPD 0x00
1
0
#define MII_LSI_STAT_FDX 0x00
40
#define MII_LSI_STAT_SPD 0x00
8
0
/* 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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment