Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
05b4e6e6
Commit
05b4e6e6
authored
Jan 17, 2012
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel modules: adapt wr_nic to new register names
parent
15f14d49
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
endpoint.c
kernel/wr_nic/endpoint.c
+9
-9
No files found.
kernel/wr_nic/endpoint.c
View file @
05b4e6e6
...
...
@@ -28,11 +28,11 @@ int wrn_phy_read(struct net_device *dev, int phy_id, int location)
u32
val
;
wrn_ep_write
(
ep
,
MDIO_CR
,
EP_MDIO_CR_ADDR_W
(
location
));
while
(
(
wrn_ep_read
(
ep
,
MDIO_
SR
)
&
EP_MDIO_
SR_READY
)
==
0
)
while
(
(
wrn_ep_read
(
ep
,
MDIO_
ASR
)
&
EP_MDIO_A
SR_READY
)
==
0
)
;
val
=
wrn_ep_read
(
ep
,
MDIO_SR
);
val
=
wrn_ep_read
(
ep
,
MDIO_
A
SR
);
/* mask from wbgen macros */
return
EP_MDIO_SR_RDATA_R
(
val
);
return
EP_MDIO_
A
SR_RDATA_R
(
val
);
}
void
wrn_phy_write
(
struct
net_device
*
dev
,
int
phy_id
,
int
location
,
...
...
@@ -43,7 +43,7 @@ void wrn_phy_write(struct net_device *dev, int phy_id, int location,
EP_MDIO_CR_ADDR_W
(
location
)
|
EP_MDIO_CR_DATA_W
(
value
)
|
EP_MDIO_CR_RW
);
while
(
(
wrn_ep_read
(
ep
,
MDIO_
SR
)
&
EP_MDIO_
SR_READY
)
==
0
)
while
(
(
wrn_ep_read
(
ep
,
MDIO_
ASR
)
&
EP_MDIO_A
SR_READY
)
==
0
)
;
}
...
...
@@ -130,9 +130,9 @@ int wrn_ep_open(struct net_device *dev)
/* Prepare hardware registers: first config, then bring up */
writel
(
0
|
EP_
RFCR
_QMODE_W
(
0x3
)
/* unqualified port */
|
EP_
RFCR
_PRIO_VAL_W
(
4
),
/* some mid priority */
&
ep
->
ep_regs
->
RFCR
);
|
EP_
VCR0
_QMODE_W
(
0x3
)
/* unqualified port */
|
EP_
VCR0
_PRIO_VAL_W
(
4
),
/* some mid priority */
&
ep
->
ep_regs
->
VCR0
);
/*
* enable RX timestamping (it has no impact on performance)
...
...
@@ -144,8 +144,8 @@ int wrn_ep_open(struct net_device *dev)
writel
(
0
|
EP_ECR_PORTID_W
(
ep
->
ep_number
)
|
EP_ECR_RST_CNT
|
EP_ECR_TX_EN
_FRA
|
EP_ECR_RX_EN
_FRA
,
|
EP_ECR_TX_EN
|
EP_ECR_RX_EN
,
&
ep
->
ep_regs
->
ECR
);
/* Setup DMCR */
...
...
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