Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
31
Issues
31
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
Software for White Rabbit PTP Core
Commits
9db811ce
Commit
9db811ce
authored
Jul 03, 2017
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'abscal' into proposed_master
parents
98b29a7f
1f022977
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
4 deletions
+23
-4
Kconfig
Kconfig
+10
-0
Makefile
Makefile
+1
-0
minic.c
dev/minic.c
+1
-1
wrc_ptp.h
include/wrc_ptp.h
+1
-0
net.c
lib/net.c
+1
-1
ppsi
ppsi
+1
-1
cmd_ptp.c
shell/cmd_ptp.c
+8
-1
No files found.
Kconfig
View file @
9db811ce
...
...
@@ -283,10 +283,20 @@ config WR_NODE_SIM
is avoided. The main function sends min-size frames to PTP
MAC address destination and expects the simulation to return
these frames.
config ABSCAL
default y
boolean "Support absolute calibration"
help
If you select this, you'll be able to do absolute calibration
using a loop-back SFP adapter, according to the procedure
described and documented by Peter Jansweijer.
#
# This is a set of configuration options that should not be changed by
# normal users. If the "developer" menu is used, the binary is tainted.
comment "wrpc-sw is tainted if you change the following options"
config DEVELOPER
depends on WR_NODE
...
...
Makefile
View file @
9db811ce
...
...
@@ -8,6 +8,7 @@ ifdef CONFIG_HOST_PROCESS
endif
export
CROSS_COMPILE
export
CONFIG_ABSCAL
CC
=
$(CROSS_COMPILE)
gcc
LD
=
$(CROSS_COMPILE)
ld
...
...
dev/minic.c
View file @
9db811ce
...
...
@@ -197,7 +197,7 @@ int minic_rx_frame(struct wr_ethhdr *hdr, uint8_t * payload, uint32_t buf_size,
&&
counter_ppsg
<
250000000
)
sec
--
;
hwts
->
sec
=
sec
&
0x7fffffff
;
hwts
->
sec
=
sec
;
cntr_diff
=
(
counter_r
&
F_COUNTER_MASK
)
-
counter_f
;
...
...
include/wrc_ptp.h
View file @
9db811ce
...
...
@@ -5,6 +5,7 @@
#define WRC_MODE_GM 1
#define WRC_MODE_MASTER 2
#define WRC_MODE_SLAVE 3
#define WRC_MODE_ABSCAL 4
extern
int
ptp_mode
;
int
wrc_ptp_init
(
void
);
...
...
lib/net.c
View file @
9db811ce
...
...
@@ -252,7 +252,7 @@ int ptpd_netif_recvfrom(struct wrpc_socket *s, struct wr_sockaddr *from, void *d
rx_timestamp
->
sec
=
hwts
.
sec
;
rx_timestamp
->
nsec
=
hwts
.
nsec
;
rx_timestamp
->
phase
=
0
;
rx_timestamp
->
correct
=
hwts
.
valid
&
(
!
spll_busy
);
rx_timestamp
->
correct
=
hwts
.
valid
&
&
(
!
spll_busy
);
ptpd_netif_linearize_rx_timestamp
(
rx_timestamp
,
rx_timestamp
->
raw_phase
,
...
...
ppsi
@
365e3e99
Subproject commit 3
1f08f198ffad87d80e6545ffdb598b6278453e5
Subproject commit 3
65e3e99a86e241e597c9c18253497687cccd490
shell/cmd_ptp.c
View file @
9db811ce
...
...
@@ -26,12 +26,19 @@ struct subcmd {
{
"gm"
,
wrc_ptp_set_mode
,
WRC_MODE_GM
},
{
"master"
,
wrc_ptp_set_mode
,
WRC_MODE_MASTER
},
{
"slave"
,
wrc_ptp_set_mode
,
WRC_MODE_SLAVE
},
#ifdef CONFIG_ABSCAL
{
"abscal"
,
wrc_ptp_set_mode
,
WRC_MODE_ABSCAL
},
#endif
};
static
char
*
is_run
[]
=
{
"stopped"
,
"running"
};
static
char
*
is_mech
[]
=
{[
PP_E2E_MECH
]
=
"e2e"
,
[
PP_P2P_MECH
]
=
"p2p"
};
static
char
*
is_mode
[]
=
{[
WRC_MODE_GM
]
=
"gm"
,
[
WRC_MODE_MASTER
]
=
"master"
,
[
WRC_MODE_SLAVE
]
=
"slave"
};
[
WRC_MODE_SLAVE
]
=
"slave"
#ifdef CONFIG_ABSCAL
,
[
WRC_MODE_ABSCAL
]
=
"abscal"
#endif
};
static
int
cmd_ptp
(
const
char
*
args
[])
{
...
...
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