@@ -427,13 +427,12 @@ static int qede_ptp_init(struct qede_dev *edev, bool init_tc)
* unload / load (e.g. MTU change) while it is running.
*/
if (init_tc) {
- memset(&ptp->tc.cc, 0, sizeof(ptp->tc.cc));
- ptp->tc.cc.read = qede_ptp_read_cc;
- ptp->tc.cc.mask = CYCLECOUNTER_MASK(64);
- ptp->tc.cc.shift = 0;
- ptp->tc.cc.mult = 1;
-
- timecounter_init(&ptp->tc, ktime_to_ns(ktime_get_real()));
+ timecounter_initialize(&ptp->tc,
+ qede_ptp_read_cc,
+ CYCLECOUNTER_MASK(64),
+ 1,
+ 0,
+ ktime_to_ns(ktime_get_real()));
}
return rc;
With new interface timecounter_initialize we can initialize timecounter fields and underlying cyclecounter together. Update qede timecounter init with this new function. Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@intel.com> Cc: Richard Cochran <richardcochran@gmail.com> Cc: Ariel Elior <Ariel.Elior@cavium.com> Cc: everest-linux-l2@cavium.com Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- drivers/net/ethernet/qlogic/qede/qede_ptp.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)