Commit 4ba454d8 authored by Alessandro Rubini's avatar Alessandro Rubini

arch-wrpc: adapt to new calibration

call t24p calibration every time PTP is set to Slave mode. This
is a port of commit 279f2c6b of wrc-sw, by Grzegorz Daniluk, since
wrc_ptp_ppsi.c was still part of the supermodule.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 20662678
......@@ -21,6 +21,9 @@
#include "softpll_ng.h"
#include "pps_gen.h"
#include "uart.h"
#include "rxts_calibrator.h"
extern int32_t cal_phase_transition;
int ptp_mode = WRC_MODE_UNKNOWN;
static int ptp_enabled = 0, ptp_forced_stop = 0;
......@@ -128,11 +131,13 @@ int wrc_ptp_set_mode(int mode)
return -EINTR;
}
}
pp_printf("\n");
calib_t24p(mode, &cal_phase_transition);
if (mode == WRC_MODE_MASTER || mode == WRC_MODE_GM)
shw_pps_gen_enable_output(1);
pp_printf("\n");
ptp_mode = mode;
return 0;
}
......
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