summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/e1000e/e1000.h
diff options
context:
space:
mode:
authorBruce Allan <bruce.w.allan@intel.com>2013-01-19 01:09:58 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2013-01-27 00:36:35 -0800
commitd89777bf0e42e7cb6ce8eae35190b9375c3b4211 (patch)
treef1ec4ec54324abc8b19ce0ac04b53b57ca0d4542 /drivers/net/ethernet/intel/e1000e/e1000.h
parent347b5201cb2e8b9e4a20d81582563f51336eb215 (diff)
e1000e: add support for IEEE-1588 PTP
Add PTP IEEE-1588 support and make accesible via the PHC subsystem. v2: make e1000e_ptp_clock_info a static const struct per Stephen Hemminger Cc: Stephen Hemminger <stephen@networkplumber.org> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Reviewed-by: Jacob Keller <Jacob.e.keller@intel.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/e1000e/e1000.h')
-rw-r--r--drivers/net/ethernet/intel/e1000e/e1000.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/e1000.h b/drivers/net/ethernet/intel/e1000e/e1000.h
index dea9e5552966..bd5876171376 100644
--- a/drivers/net/ethernet/intel/e1000e/e1000.h
+++ b/drivers/net/ethernet/intel/e1000e/e1000.h
@@ -43,7 +43,8 @@
#include <linux/if_vlan.h>
#include <linux/clocksource.h>
#include <linux/net_tstamp.h>
-
+#include <linux/ptp_clock_kernel.h>
+#include <linux/ptp_classify.h>
#include "hw.h"
struct e1000_info;
@@ -413,6 +414,8 @@ struct e1000_adapter {
spinlock_t systim_lock; /* protects SYSTIML/H regsters */
struct cyclecounter cc;
struct timecounter tc;
+ struct ptp_clock *ptp_clock;
+ struct ptp_clock_info ptp_clock_info;
};
struct e1000_info {
@@ -427,6 +430,8 @@ struct e1000_info {
const struct e1000_nvm_operations *nvm_ops;
};
+s32 e1000e_get_base_timinca(struct e1000_adapter *adapter, u32 *timinca);
+
/* The system time is maintained by a 64-bit counter comprised of the 32-bit
* SYSTIMH and SYSTIML registers. How the counter increments (and therefore
* its resolution) is based on the contents of the TIMINCA register - it
@@ -704,6 +709,8 @@ extern s32 e1000_phy_force_speed_duplex_ife(struct e1000_hw *hw);
extern s32 e1000_check_polarity_igp(struct e1000_hw *hw);
extern bool e1000_check_phy_82574(struct e1000_hw *hw);
extern s32 e1000_read_emi_reg_locked(struct e1000_hw *hw, u16 addr, u16 *data);
+extern void e1000e_ptp_init(struct e1000_adapter *adapter);
+extern void e1000e_ptp_remove(struct e1000_adapter *adapter);
static inline s32 e1000_phy_hw_reset(struct e1000_hw *hw)
{