From 89bddcda7e4f4ff2586e736427405115c362bed4 Mon Sep 17 00:00:00 2001 From: Luwei Zhou Date: Fri, 10 Oct 2014 13:15:29 +0800 Subject: net: fec: ptp: Use hardware algorithm to adjust PTP counter. The FEC IP supports hardware adjustment for ptp timer. Refer to the description of ENET_ATCOR and ENET_ATINC registers in the spec about the hardware adjustment. This patch uses hardware support to adjust the ptp offset and frequency on the slave side. Signed-off-by: Luwei Zhou Signed-off-by: Frank Li Signed-off-by: Fugang Duan Signed-off-by: David S. Miller --- drivers/net/ethernet/freescale/fec.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/net/ethernet/freescale/fec.h') diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/freescale/fec.h index 1d5e1822bb2c..b0e60258d403 100644 --- a/drivers/net/ethernet/freescale/fec.h +++ b/drivers/net/ethernet/freescale/fec.h @@ -484,6 +484,9 @@ struct fec_enet_private { unsigned int itr_clk_rate; u32 rx_copybreak; + + /* ptp clock period in ns*/ + unsigned int ptp_inc; }; void fec_ptp_init(struct platform_device *pdev); -- cgit v1.2.3