Commit 1f67f4d2 authored by Alessandro Rubini's avatar Alessandro Rubini Committed by Grzegorz Daniluk

added absolute calibration (mostly in ppsi)

This introduces "mode abscal", that forces a gm-lookalike mode in the
node, to send sync once per second. See "absolute calibration" document
by Peter Jansweijer from nikhef. The option is Kconfig'd, but on by
default.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>

Conflicts:
	ppsi
parent 355d2836
......@@ -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
......
......@@ -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);
......
ppsi @ 0f688012
Subproject commit 31f08f198ffad87d80e6545ffdb598b6278453e5
Subproject commit 0f688012bc7326d1d901a3e7c7f1ff96fe8aafc3
......@@ -26,12 +26,14 @@ 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},
{"abscal", wrc_ptp_set_mode, WRC_MODE_ABSCAL},
};
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",
[WRC_MODE_ABSCAL] = "abscal"};
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