summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igb/igb.h
diff options
context:
space:
mode:
authorRichard Cochran <richardcochran@gmail.com>2012-03-16 10:55:32 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-04-04 00:34:23 -0700
commitd339b1331616718b414d0ef3df5f2b6bfb2c36d7 (patch)
treecf51fbc9bb7062047ba9096d69f6b6bea82f68c8 /drivers/net/ethernet/intel/igb/igb.h
parent7116130251200f00638f31a6e3b2232b80050c6b (diff)
downloadop-kernel-dev-d339b1331616718b414d0ef3df5f2b6bfb2c36d7.zip
op-kernel-dev-d339b1331616718b414d0ef3df5f2b6bfb2c36d7.tar.gz
igb: add PTP Hardware Clock code
This patch adds a source file implementing a PHC. Only the basic clock operations have been implemented, although the hardware would offer some ancillary functions. The code is fairly self contained and is not yet used in the main igb driver. Every timestamp and clock read operation must consult the overflow counter to form a correct time value. Access to the counter is protected by a spin lock, and the counter is implemented using the standard cyclecounter/timecounter code. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/igb/igb.h')
-rw-r--r--drivers/net/ethernet/intel/igb/igb.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h
index 8e33bdd..f0265e8 100644
--- a/drivers/net/ethernet/intel/igb/igb.h
+++ b/drivers/net/ethernet/intel/igb/igb.h
@@ -37,6 +37,7 @@
#include <linux/clocksource.h>
#include <linux/timecompare.h>
#include <linux/net_tstamp.h>
+#include <linux/ptp_clock_kernel.h>
#include <linux/bitops.h>
#include <linux/if_vlan.h>
@@ -364,6 +365,13 @@ struct igb_adapter {
u32 wvbr;
int node;
u32 *shadow_vfta;
+
+ struct ptp_clock *ptp_clock;
+ struct ptp_clock_info caps;
+ struct delayed_work overflow_work;
+ spinlock_t tmreg_lock;
+ struct cyclecounter cc;
+ struct timecounter tc;
};
#define IGB_FLAG_HAS_MSI (1 << 0)
OpenPOWER on IntegriCloud