mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-25 02:32:08 +03:00
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 <vbhadram@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2209177 Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Revanth Kumar Uppala
parent
c080c796e2
commit
94a5973d19
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user