Issue: CAN HW timestamp information is incorrect in case one of the
Tegra is made PTP master.
Fix: CAN HW timestamp is based on get_ptp_hwtime function which is
exported by PTP notifier framework. Above function relies on callback
registered by eqos driver. This callack was registered when adjust
PTP time was called. But adjust is not called for PTP master. Moved
the callback registration to set HWTSTAMP ioctl which is required by
both PTP master and slave.
Bug
1887016
Change-Id: Iaad1d7cdff4fc2aaf3e015ddf7b8c5ef189add3f
Reviewed-on: http://git-master/r/
1491662
(cherry picked from commit
1593119045757decc0e3d71fc733d678df8637aa)
Reviewed-on: http://git-master/r/
1503233
GVS: Gerrit_Virtual_Submit
Tested-by: Abhijit . <abhijit@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
/* initialize system time */
getnstimeofday(&now);
hw_if->init_systime(now.tv_sec, now.tv_nsec);
+
+ DBGPR_PTP("-->eqos registering get_ptp function\n");
+ /* Register broadcasting MAC timestamp to clients */
+ tegra_register_hwtime_source(hw_if->get_systime);
}
DBGPR_PTP("config.flags = %#x, tx_type = %#x, rx_filter = %#x\n",
raw_spin_unlock(&pdata->ptp_lock);
- /* Register broadcasting MAC timestamp to clients */
- tegra_register_hwtime_source(hw_if->get_systime);
-
DBGPR_PTP("<--eqos_adjust_time\n");
return 0;