aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro/stmmac/stmmac.h
diff options
context:
space:
mode:
authorRayagond Kokatanur <rayagond@vayavyalabs.com>2013-03-26 00:43:10 -0400
committerDavid S. Miller <davem@davemloft.net>2013-03-26 12:53:37 -0400
commit891434b18ec0a21cfa4788695165b74e8d4c0474 (patch)
tree1b052da23d5f4b86efdf0cf45330bf64958e9b62 /drivers/net/ethernet/stmicro/stmmac/stmmac.h
parentcf32deec16e4e8d47305bdc638fd108c88e06081 (diff)
stmmac: add IEEE PTPv1 and PTPv2 support.
This patch enhances the stmmac driver to support IEEE 1588-2002 PTP (Precision Time Protocol) version 1 and IEEE 1588-2008 PPT version 2. Precision Time Protocol(PTP),which enables precise synchronization of clocks in measurement and control systems implemented with technologies such as network communication,local computing, & distributed objects. Both PTPv1 and PTPv2 is selected at run-time using the HW capability register. The PTPv1 TimeStamp support can be used on chips that have the normal descriptor structures and PTPv2 TimeStamp support can be used on chips that have the Extended descriptors(DES4-5-6-7). All such sanity checks are done and verified by using HW capability register. V2: in this version the ethtool support has been included in this patch; Koptions have been completely removed (previously added to select PTP and PTPv2). PTPv1 and PTPv2 is now added in a single patch instead of two patches. get_timestamp() and get_systemtime() L/H have been combined into single APIs. Signed-off-by: Rayagond Kokatanur <rayagond@vayavyalabs.com> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac.h')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
index 5176cae44b03..a21d1b9c9094 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
@@ -99,6 +99,10 @@ struct stmmac_priv {
99 unsigned int mode; 99 unsigned int mode;
100 int extend_desc; 100 int extend_desc;
101 int pcs; 101 int pcs;
102 int hwts_tx_en;
103 int hwts_rx_en;
104 unsigned int default_addend;
105 u32 adv_ts;
102}; 106};
103 107
104extern int phyaddr; 108extern int phyaddr;
@@ -108,6 +112,7 @@ extern int stmmac_mdio_register(struct net_device *ndev);
108extern void stmmac_set_ethtool_ops(struct net_device *netdev); 112extern void stmmac_set_ethtool_ops(struct net_device *netdev);
109extern const struct stmmac_desc_ops enh_desc_ops; 113extern const struct stmmac_desc_ops enh_desc_ops;
110extern const struct stmmac_desc_ops ndesc_ops; 114extern const struct stmmac_desc_ops ndesc_ops;
115extern const struct stmmac_hwtimestamp stmmac_ptp;
111int stmmac_freeze(struct net_device *ndev); 116int stmmac_freeze(struct net_device *ndev);
112int stmmac_restore(struct net_device *ndev); 117int stmmac_restore(struct net_device *ndev);
113int stmmac_resume(struct net_device *ndev); 118int stmmac_resume(struct net_device *ndev);