Commit 9db811ce authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

Merge branch 'abscal' into proposed_master

parents 98b29a7f 1f022977
......@@ -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
......
......@@ -8,6 +8,7 @@ ifdef CONFIG_HOST_PROCESS
endif
export CROSS_COMPILE
export CONFIG_ABSCAL
CC = $(CROSS_COMPILE)gcc
LD = $(CROSS_COMPILE)ld
......
......@@ -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;
......
......@@ -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);
......
......@@ -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 31f08f198ffad87d80e6545ffdb598b6278453e5
Subproject commit 365e3e99a86e241e597c9c18253497687cccd490
......@@ -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[])
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment