Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uboot-i9100
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
onny
uboot-i9100
Commits
91cdaa3a
Commit
91cdaa3a
authored
17 years ago
by
Anton Vorontsov
Committed by
Kim Phillips
17 years ago
Browse files
Options
Downloads
Patches
Plain Diff
uec: add support for gbit mii status readings
Signed-off-by:
Anton Vorontsov
<
avorontsov@ru.mvista.com
>
parent
aabce7fb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
drivers/qe/uec_phy.c
+19
-9
19 additions, 9 deletions
drivers/qe/uec_phy.c
drivers/qe/uec_phy.h
+5
-0
5 additions, 0 deletions
drivers/qe/uec_phy.h
with
24 additions
and
9 deletions
drivers/qe/uec_phy.c
+
19
−
9
View file @
91cdaa3a
...
...
@@ -318,16 +318,26 @@ static int genmii_read_status (struct uec_mii_info *mii_info)
return
err
;
if
(
mii_info
->
autoneg
)
{
status
=
phy_read
(
mii_info
,
PHY_ANLPAR
);
status
=
phy_read
(
mii_info
,
MII_1000BASETSTATUS
);
if
(
status
&
(
PHY_ANLPAR_10FD
|
PHY_ANLPAR_TXFD
))
mii_info
->
duplex
=
DUPLEX_FULL
;
else
mii_info
->
duplex
=
DUPLEX_HALF
;
if
(
status
&
(
PHY_ANLPAR_TXFD
|
PHY_ANLPAR_TX
))
mii_info
->
speed
=
SPEED_100
;
else
mii_info
->
speed
=
SPEED_10
;
if
(
status
&
(
LPA_1000FULL
|
LPA_1000HALF
))
{
mii_info
->
speed
=
SPEED_1000
;
if
(
status
&
LPA_1000FULL
)
mii_info
->
duplex
=
DUPLEX_FULL
;
else
mii_info
->
duplex
=
DUPLEX_HALF
;
}
else
{
status
=
phy_read
(
mii_info
,
PHY_ANLPAR
);
if
(
status
&
(
PHY_ANLPAR_10FD
|
PHY_ANLPAR_TXFD
))
mii_info
->
duplex
=
DUPLEX_FULL
;
else
mii_info
->
duplex
=
DUPLEX_HALF
;
if
(
status
&
(
PHY_ANLPAR_TXFD
|
PHY_ANLPAR_TX
))
mii_info
->
speed
=
SPEED_100
;
else
mii_info
->
speed
=
SPEED_10
;
}
mii_info
->
pause
=
0
;
}
/* On non-aneg, we assume what we put in BMCR is the speed,
...
...
This diff is collapsed.
Click to expand it.
drivers/qe/uec_phy.h
+
5
−
0
View file @
91cdaa3a
...
...
@@ -29,6 +29,11 @@
#define MII_1000BASETCONTROL_FULLDUPLEXCAP 0x0200
#define MII_1000BASETCONTROL_HALFDUPLEXCAP 0x0100
/* 1000BT status */
#define MII_1000BASETSTATUS 0x0a
#define LPA_1000FULL 0x0400
#define LPA_1000HALF 0x0200
/* Cicada Extended Control Register 1 */
#define MII_CIS8201_EXT_CON1 0x17
#define MII_CIS8201_EXTCON1_INIT 0x0000
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment