diff options
author | Madalin Bucur <madalin.bucur@freescale.com> | 2013-04-17 12:54:09 (GMT) |
---|---|---|
committer | Fleming Andrew-AFLEMING <AFLEMING@freescale.com> | 2013-04-18 15:23:29 (GMT) |
commit | 077a980e55a7ceb6040ad39474d019114bbe82cb (patch) | |
tree | 2bca729e953862fce4462483eb7a65553a2bdf93 /drivers/net/ethernet/freescale/dpa/dpaa_eth.h | |
parent | ac6cda36f5de41f698c7c5d3a4d1a5d8a4c7ce8b (diff) | |
download | linux-fsl-qoriq-077a980e55a7ceb6040ad39474d019114bbe82cb.tar.xz |
dpaa_eth: Add support for hardware timestamping
Add Linux conforming support for hardware timestamping.
Minor fixes and comments about the FSL_DPA_1588 code.
Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com>
Change-Id: I6f9cd77cbe157219cb77e87bb8cfd72bee037261
Reviewed-on: http://git.am.freescale.net:8181/1469
Reviewed-by: Radulescu Ruxandra Ioana-B05472 <ruxandra.radulescu@freescale.com>
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Diffstat (limited to 'drivers/net/ethernet/freescale/dpa/dpaa_eth.h')
-rw-r--r-- | drivers/net/ethernet/freescale/dpa/dpaa_eth.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth.h b/drivers/net/ethernet/freescale/dpa/dpaa_eth.h index 9c946aa..abb7f08 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth.h +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth.h @@ -366,7 +366,9 @@ struct dpa_priv_s { #endif uint32_t msg_enable; /* net_device message level */ +#ifdef CONFIG_FSL_DPA_1588 struct dpa_ptp_tsu *tsu; +#endif #if defined(CONFIG_DPAA_FMAN_UNIT_TESTS) /* TODO: this is temporary until pcd support is implemented in dpaa */ @@ -390,6 +392,12 @@ struct dpa_priv_s { */ u32 cgr_congested_count; } cgr_data; + +#ifdef CONFIG_FSL_DPA_TS + bool ts_tx_en; /* Tx timestamping enabled */ + bool ts_rx_en; /* Rx timestamping enabled */ +#endif /* CONFIG_FSL_DPA_TS */ + /* * Store here the needed Tx headroom for convenience and speed * (even though it can be computed based on the fields of buf_layout) @@ -630,4 +638,10 @@ static inline void _dpa_assign_wq(struct dpa_fq *fq) skb_get_queue_mapping(skb) #endif +#ifdef CONFIG_FSL_DPA_TS +/* Updates the skb shared hw timestamp from the hardware timestamp */ +int dpa_get_ts(const struct dpa_priv_s *priv, enum port_type rx_tx, + struct skb_shared_hwtstamps *shhwtstamps, const void *data); +#endif /* CONFIG_FSL_DPA_TS */ + #endif /* __DPA_H */ |