Hi. I'm using LinuxPTP on an i.MX7D (on a Compulab module), and I think I've found an issue with the PTP driver in drivers/net/ethernet/freescale/fec_ptp.c (which is still in the current git head at https://github.com/nxp-imx/linux-imx/blob/lf-6.12.y/drivers/net/ethernet/freescale/fec_ptp.c)
The issue is that the ENETx_ATCOR register (called FEC_ATIME_CORR in the driver) is not initialized in fec_ptp_start_cyclecounter. If fec_ptp_adjfine sets it to a weird place, there's no way to fix it, except for rebooting. Since ENETx_ATINC (FEC_ATIME_INC) is reinitialized in fec_ptp_start_cyclecounter, ENETx_ATCOR should be as well (to its reset value of 0 I believe).
Otherwise if ENETx_ATCOR starts at a bad value, LinuxPTP can get into states where it won't converge.
已解决! 转到解答。