diff options
author | Luwei Zhou <b45643@freescale.com> | 2014-10-10 09:15:30 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-14 22:45:08 +0400 |
commit | 278d24047891a1bf4a98128eaa8ecafd019e58c2 (patch) | |
tree | 57cb9578e7e20ab6700a715e67834d08b399a11a /drivers/net/ethernet/freescale/fec.h | |
parent | 89bddcda7e4f4ff2586e736427405115c362bed4 (diff) | |
download | linux-278d24047891a1bf4a98128eaa8ecafd019e58c2.tar.xz |
net: fec: ptp: Enable PPS output based on ptp clock
FEC ptp timer has 4 channel compare/trigger function. It can be used to
enable pps output.
The pulse would be ouput high exactly on N second. The pulse ouput high
on compare event mode is used to produce pulse per second. The pulse
width would be one cycle based on ptp timer clock source.Since 31-bit
ptp hardware timer is used, the timer will wrap more than 2 seconds. We
need to reload the compare compare event about every 1 second.
Signed-off-by: Luwei Zhou <b45643@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale/fec.h')
-rw-r--r-- | drivers/net/ethernet/freescale/fec.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/freescale/fec.h index b0e60258d403..1e65917a9381 100644 --- a/drivers/net/ethernet/freescale/fec.h +++ b/drivers/net/ethernet/freescale/fec.h @@ -487,12 +487,19 @@ struct fec_enet_private { /* ptp clock period in ns*/ unsigned int ptp_inc; + + /* pps */ + int pps_channel; + unsigned int reload_period; + int pps_enable; + unsigned int next_counter; }; void fec_ptp_init(struct platform_device *pdev); void fec_ptp_start_cyclecounter(struct net_device *ndev); int fec_ptp_set(struct net_device *ndev, struct ifreq *ifr); int fec_ptp_get(struct net_device *ndev, struct ifreq *ifr); +uint fec_ptp_check_pps_event(struct fec_enet_private *fep); /****************************************************************************/ #endif /* FEC_H */ |