net: ethernet: ti: cpts: switch to use new .gettimex64() interface
authorGrygorii Strashko <grygorii.strashko@ti.com>
Thu, 23 Apr 2020 14:20:16 +0000 (17:20 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Apr 2020 19:50:20 +0000 (12:50 -0700)
commit856e59ab7e6d3c85ee739f3f53341d47c88d454e
treeaed3bbf1ab4a708b99dbb3b8b3f926c0e44da11c
parent0d6df3e613b74fe1a88de89cda63a0352e1dc4eb
net: ethernet: ti: cpts: switch to use new .gettimex64() interface

The CPTS HW latches and saves CPTS counter value in CPTS fifo immediately
after writing to CPSW_CPTS_PUSH.TS_PUSH (bit 0), so the total time that the
driver needs to read the CPTS timestamp is the time required CPSW_CPTS_PUSH
write to actually reach HW.

Hence switch CPTS driver to implement new .gettimex64() callback for more
precise measurement of the offset between a PHC and the system clock which
is measured as time between
  write(CPSW_CPTS_PUSH)
  read(CPSW_CPTS_PUSH)

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpts.c