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
62a093c3
Commit
62a093c3
authored
May 22, 2020
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hal_shm: add flag to indicate if t24p was loaded from config
parent
b5478bfe
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
0 deletions
+7
-0
hal_shmem.h
userspace/libwr/include/libwr/hal_shmem.h
+1
-0
wrs_dump_shmem.c
userspace/tools/wrs_dump_shmem.c
+1
-0
hal_port_fsm.c
userspace/wrsw_hal/hal_port_fsm.c
+5
-0
No files found.
userspace/libwr/include/libwr/hal_shmem.h
View file @
62a093c3
...
...
@@ -143,6 +143,7 @@ struct hal_port_state {
/* approximate phase value (on master port) at which RX timestamp (T4)
* counter transistion occurs (picoseconds) */
uint32_t
t4_phase_transition
;
int
t24p_from_config
;
/* non-zero: t24p was loaded from config file */
uint32_t
ep_base
;
/* Endpoint's base address */
...
...
userspace/tools/wrs_dump_shmem.c
View file @
62a093c3
...
...
@@ -446,6 +446,7 @@ struct dump_info hal_port_info [] = {
DUMP_FIELD
(
uint32_t
,
clock_period
),
DUMP_FIELD
(
uint32_t
,
t2_phase_transition
),
DUMP_FIELD
(
uint32_t
,
t4_phase_transition
),
DUMP_FIELD
(
int
,
t24p_from_config
),
DUMP_FIELD
(
uint32_t
,
ep_base
),
DUMP_FIELD
(
int
,
sfpPresent
),
DUMP_FIELD
(
int
,
has_sfp_diag
),
...
...
userspace/wrsw_hal/hal_port_fsm.c
View file @
62a093c3
...
...
@@ -451,6 +451,7 @@ static void init_port(struct hal_port_state * ps)
{
char
*
retValue
;
int
t24p
;
int
from_config
;
char
key
[
128
];
reset_port
(
ps
);
...
...
@@ -459,18 +460,22 @@ static void init_port(struct hal_port_state * ps)
/* Rading t24p from the dot-config file could be done once in hal_ports, but
* I leave it here since we will implement automatic measurement procedure
* in the future release */
from_config
=
1
;
sprintf
(
key
,
"PORT%02i_INST01_T24P_TRANS_POINT"
,
ps
->
hw_index
+
1
);
if
(
(
retValue
=
libwr_cfg_get
(
key
))
==
NULL
)
{
pr_error
(
"port %i (%s): no key
\"
%s
\"
specified.
\n
"
,
ps
->
hw_index
+
1
,
ps
->
name
,
key
);
t24p
=
DEFAULT_T2_PHASE_TRANS
;
from_config
=
0
;
}
else
if
(
sscanf
(
retValue
,
"%i"
,
&
t24p
)
!=
1
)
{
pr_error
(
"port %i (%s): Invalid key
\"
%s
\"
value (%d).
\n
"
,
ps
->
hw_index
+
1
,
ps
->
name
,
key
,
*
retValue
);
from_config
=
0
;
}
ps
->
t2_phase_transition
=
t24p
;
ps
->
t4_phase_transition
=
t24p
;
ps
->
t24p_from_config
=
from_config
;
}
...
...
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