From 50d2dbba6198a9e195bad36990c259cfd911d53c Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Mon, 31 Mar 2014 17:57:51 +0200 Subject: apalis_t30: ieee 1588 ptp support Enable IEEE 1588 precision time protocol (PTP) support. --- arch/arm/configs/apalis_t30_defconfig | 2 ++ drivers/net/Kconfig | 12 ++++++++++++ drivers/net/igb/Makefile | 1 + drivers/net/igb/kcompat.h | 7 +++++-- 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/arch/arm/configs/apalis_t30_defconfig b/arch/arm/configs/apalis_t30_defconfig index a94fa49b5b05..c60fa0c3e1b7 100644 --- a/arch/arm/configs/apalis_t30_defconfig +++ b/arch/arm/configs/apalis_t30_defconfig @@ -178,6 +178,7 @@ CONFIG_DUMMY=y CONFIG_TUN=y CONFIG_NETDEV_1000=y CONFIG_IGB=y +CONFIG_IGB_PTP=y # CONFIG_NETDEV_10000 is not set # Hack to force WIRELESS_EXT required to build Redpine Signals LiteFi driver CONFIG_USB_ZD1201=m @@ -223,6 +224,7 @@ CONFIG_I2C_TEGRA=y CONFIG_SPI=y CONFIG_SPI_TEGRA=y CONFIG_SPI_SPIDEV=y +CONFIG_PPS=y CONFIG_DEBUG_GPIO=y CONFIG_GPIO_SYSFS=y CONFIG_POWER_SUPPLY=y 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) ) -- cgit v1.2.3