]> git.baikalelectronics.ru Git - kernel.git/commit
ptp: ptp_clockmatrix: Add wait_for_sys_apll_dpll_lock.
authorVincent Cheng <vincent.cheng.xh@renesas.com>
Wed, 17 Feb 2021 05:42:12 +0000 (00:42 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Feb 2021 21:49:25 +0000 (13:49 -0800)
commiteb4226638015ac4a3b9df1f8cb4dabacf55c522f
treee6e42ecdfd4a9c36826d3d68b201f081be2cfce4
parentfc78a93deb5c1161324a62dc7c855127f2cd6d9d
ptp: ptp_clockmatrix: Add wait_for_sys_apll_dpll_lock.

Part of the device initialization aligns the rising edge of the output
clock to the internal 1 PPS clock. If the system APLL and DPLL is not
locked, then the alignment will fail and there will be a fixed offset
between the internal 1 PPS clock and the output clock.

After loading the device firmware, poll the system APLL and DPLL for
locked state prior to initialization, timing out after 2 seconds.

Signed-off-by: Vincent Cheng <vincent.cheng.xh@renesas.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/ptp/idt8a340_reg.h
drivers/ptp/ptp_clockmatrix.c
drivers/ptp/ptp_clockmatrix.h