summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2014-03-31 17:57:51 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2014-03-31 17:57:51 +0200
commit50d2dbba6198a9e195bad36990c259cfd911d53c (patch)
tree5f69eb6bf5423356c55b1d5fd5c459c913f07df3 /drivers/net
parentf032a4e356a04f3ab3d14805b34d48d64ce2a8ca (diff)
apalis_t30: ieee 1588 ptp support
Enable IEEE 1588 precision time protocol (PTP) support.
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/Kconfig12
-rw-r--r--drivers/net/igb/Makefile1
-rw-r--r--drivers/net/igb/kcompat.h7
3 files changed, 18 insertions, 2 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 8e7c0a322645..bcd010078fbb 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -2159,6 +2159,18 @@ config IGB
To compile this driver as a module, choose M here. The module
will be called igb.
+config IGB_PTP
+ bool "PTP Hardware Clock (PHC)"
+ default n
+ depends on IGB
+ select PTP_1588_CLOCK
+ ---help---
+ Say Y here if you want to use PTP Hardware Clock (PHC) in the
+ driver. Only the basic clock operations have been implemented.
+
+ Every timestamp and clock read operations must consult the
+ overflow counter to form a correct time value.
+
config IGB_HWMON
bool "Intel(R) PCI-Express Gigabit adapters HWMON support"
default y
diff --git a/drivers/net/igb/Makefile b/drivers/net/igb/Makefile
index 5d7462b8b0ef..38de6c07ecb5 100644
--- a/drivers/net/igb/Makefile
+++ b/drivers/net/igb/Makefile
@@ -37,3 +37,4 @@ igb-objs := igb_main.o igb_ethtool.o e1000_82575.o \
e1000_i210.o \
e1000_manage.o igb_param.o kcompat.o e1000_api.o \
igb_vmdq.o igb_procfs.o igb_hwmon.o igb_debugfs.o
+igb-$(CONFIG_IGB_PTP) += igb_ptp.o
diff --git a/drivers/net/igb/kcompat.h b/drivers/net/igb/kcompat.h
index 2e3afeed3808..7d2098117b54 100644
--- a/drivers/net/igb/kcompat.h
+++ b/drivers/net/igb/kcompat.h
@@ -3424,6 +3424,9 @@ static inline int _kc_kstrtol_from_user(const char __user *s, size_t count,
#ifndef HAVE_DCBNL_IEEE_DELAPP
#define HAVE_DCBNL_IEEE_DELAPP
#endif
+#ifdef CONFIG_MACH_APALIS_T30
+#define HAVE_ETHTOOL_GET_TS_INFO
+#endif
#endif /* < 3.1.0 */
/*****************************************************************************/
@@ -3578,7 +3581,7 @@ extern void _kc_skb_add_rx_frag(struct sk_buff *, int, struct page *,
#endif /* >= 3.4.0 */
/*****************************************************************************/
-#if defined(E1000E_PTP) || defined(IGB_PTP) || defined(IXGBE_PTP) || defined(I40E_PTP)
+#if defined(E1000E_PTP) || defined(CONFIG_IGB_PTP) || defined(IXGBE_PTP) || defined(I40E_PTP)
#if ( ( LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0) ) || \
( RHEL_RELEASE_CODE && ( RHEL_RELEASE_CODE > RHEL_RELEASE_VERSION(6,4) ) ) ) && \
IS_ENABLED(CONFIG_PTP_1588_CLOCK)
@@ -3586,7 +3589,7 @@ extern void _kc_skb_add_rx_frag(struct sk_buff *, int, struct page *,
#else
#error Cannot enable PTP Hardware Clock support due to a pre-3.0 kernel version or CONFIG_PTP_1588_CLOCK not enabled in the kernel
#endif /* > 3.0.0 && IS_ENABLED(CONFIG_PTP_1588_CLOCK) */
-#endif /* E1000E_PTP || IGB_PTP || IXGBE_PTP || I40E_PTP */
+#endif /* E1000E_PTP || CONFIG_IGB_PTP || IXGBE_PTP || I40E_PTP */
/*****************************************************************************/
#if ( LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0) )