aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/adi/bfin_mac.h
diff options
context:
space:
mode:
authorRichard Cochran <richardcochran@gmail.com>2012-10-31 02:27:24 -0400
committerDavid S. Miller <davem@davemloft.net>2012-11-01 11:41:35 -0400
commitdd87b22f9096863adfd5daf281beb0a83379bd8f (patch)
tree6fe070016ab65b58245cb2910f2166f880dd8c12 /drivers/net/ethernet/adi/bfin_mac.h
parentbc3c5f634de23ca767c2d04d356ddf5bbe2144e2 (diff)
bfin_mac: offer a PTP Hardware Clock.
The BF518 has a PTP time unit that works in a similar way to other MAC based clocks, like gianfar, ixp46x, and igb. This patch adds support for using the blackfin as a PHC. Although the blackfin hardware does offer a few ancillary features, this patch implements only the basic operations. Compile tested only. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Tested-by: Bob Liu <lliubbo@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/adi/bfin_mac.h')
-rw-r--r--drivers/net/ethernet/adi/bfin_mac.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/adi/bfin_mac.h b/drivers/net/ethernet/adi/bfin_mac.h
index 57f042c3111c..7a07ee07906b 100644
--- a/drivers/net/ethernet/adi/bfin_mac.h
+++ b/drivers/net/ethernet/adi/bfin_mac.h
@@ -11,6 +11,7 @@
11#define _BFIN_MAC_H_ 11#define _BFIN_MAC_H_
12 12
13#include <linux/net_tstamp.h> 13#include <linux/net_tstamp.h>
14#include <linux/ptp_clock_kernel.h>
14#include <linux/timer.h> 15#include <linux/timer.h>
15#include <linux/etherdevice.h> 16#include <linux/etherdevice.h>
16#include <linux/bfin_mac.h> 17#include <linux/bfin_mac.h>
@@ -94,7 +95,12 @@ struct bfin_mac_local {
94#if defined(CONFIG_BFIN_MAC_USE_HWSTAMP) 95#if defined(CONFIG_BFIN_MAC_USE_HWSTAMP)
95 u32 addend; 96 u32 addend;
96 unsigned int shift; 97 unsigned int shift;
98 s32 max_ppb;
97 struct hwtstamp_config stamp_cfg; 99 struct hwtstamp_config stamp_cfg;
100 struct ptp_clock_info caps;
101 struct ptp_clock *clock;
102 int phc_index;
103 spinlock_t phc_lock; /* protects time lo/hi registers */
98#endif 104#endif
99}; 105};
100 106