From 94a5973d195343986ebfe7921504d38e426b5a9f Mon Sep 17 00:00:00 2001 From: Bhadram Varka Date: Tue, 1 Oct 2019 11:50:30 +0530 Subject: [PATCH] nvethernet: enable TEGRA_PTP_NOTIFIER for nvethernet It enable TEGRA_PTP_NOTIFIER for nvethernet driver and it also take care compiling nvethernet ptp-notifer code only if TEGRA_PTP_NOTIFIER is enabled. Bug 2715274 Change-Id: Ida385b292ed05cc982facbe7c6d89025319ef9b7 Signed-off-by: Bhadram Varka Reviewed-on: https://git-master.nvidia.com/r/2209177 Reviewed-by: Srinivas Ramachandran GVS: Gerrit_Virtual_Submit Reviewed-by: Bitan Biswas Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/net/ethernet/nvidia/nvethernet/ptp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/nvidia/nvethernet/ptp.c b/drivers/net/ethernet/nvidia/nvethernet/ptp.c index 96a9063b..c8324e92 100644 --- a/drivers/net/ethernet/nvidia/nvethernet/ptp.c +++ b/drivers/net/ethernet/nvidia/nvethernet/ptp.c @@ -23,6 +23,7 @@ */ static DEFINE_RAW_SPINLOCK(ether_ts_lock); +#ifdef CONFIG_TEGRA_PTP_NOTIFIER /** * @brief Function used to get PTP time * @param[in] data: OSI core private data structure @@ -54,6 +55,7 @@ static inline u64 ether_get_ptptime(void *data) return ns; } +#endif /** * @brief Adjust MAC hardware time @@ -391,8 +393,10 @@ int ether_handle_hwtstamp_ioctl(struct ether_priv_data *pdata, osi_core->ptp_config.one_nsec_accuracy = OSI_ENABLE; /* Enable the PTP configuration */ osi_ptp_configuration(osi_core, OSI_ENABLE); +#ifdef CONFIG_TEGRA_PTP_NOTIFIER /* Register broadcasting MAC timestamp to clients */ tegra_register_hwtime_source(ether_get_ptptime, pdata); +#endif } return (copy_to_user(ifr->ifr_data, &config,