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>
This commit is contained in:
Richard Cochran
2012-10-31 06:27:24 +00:00
committed by David S. Miller
父節點 bc3c5f634d
當前提交 dd87b22f90
共有 3 個文件被更改,包括 175 次插入3 次删除

查看文件

@@ -11,6 +11,7 @@
#define _BFIN_MAC_H_
#include <linux/net_tstamp.h>
#include <linux/ptp_clock_kernel.h>
#include <linux/timer.h>
#include <linux/etherdevice.h>
#include <linux/bfin_mac.h>
@@ -94,7 +95,12 @@ struct bfin_mac_local {
#if defined(CONFIG_BFIN_MAC_USE_HWSTAMP)
u32 addend;
unsigned int shift;
s32 max_ppb;
struct hwtstamp_config stamp_cfg;
struct ptp_clock_info caps;
struct ptp_clock *clock;
int phc_index;
spinlock_t phc_lock; /* protects time lo/hi registers */
#endif
};