Commit 96293c21 authored by Alessandro Rubini's avatar Alessandro Rubini

white rabbit: enable pps when mandated master

This was already expexted to happen, but it was done in the wrong
place (my fault).  Most likely we should move this
"enable_timing_output" in the ptp-wide operations, to be used
outside of WR as well.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent ce8485bf
......@@ -151,7 +151,7 @@ int wrc_ptp_set_mode(int mode)
start_tics = timer_get_tics();
pp_printf("Locking PLL");
wrp->ops->enable_timing_output(ppi, 0);
wrp->ops->enable_timing_output(ppi, 0); /* later, wr_init chooses */
while (!spll_check_lock(0) && lock_timeout) {
timer_delay(TICS_PER_SECOND);
......@@ -168,10 +168,6 @@ int wrc_ptp_set_mode(int mode)
if (error && mode == WRC_MODE_GM)
*class_ptr = PP_CLASS_WR_GM_UNLOCKED;
/* Success or failure, we enable pps */
if (mode == WRC_MODE_MASTER || mode == WRC_MODE_GM)
wrp->ops->enable_timing_output(ppi, 1);
ptp_mode = mode;
return error;
}
......
......@@ -15,7 +15,11 @@ static int wr_init(struct pp_instance *ppi, unsigned char *pkt, int plen)
wp->parentWrConfig = NON_WR;
wp->parentWrModeOn = 0;
wp->calibrated = !WR_DEFAULT_PHY_CALIBRATION_REQUIRED;
wp->ops->enable_timing_output(ppi, 0);
if ((wp->wrConfig & WR_M_AND_S) == WR_M_ONLY)
wp->ops->enable_timing_output(ppi, 1);
else
wp->ops->enable_timing_output(ppi, 0);
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