Lines Matching refs:ts

178 				     struct timespec64 *ts)  in bcm_ptp_get_framesync_ts()  argument
192 ts->tv_sec = (hb[3] << 16) | hb[2]; in bcm_ptp_get_framesync_ts()
193 ts->tv_nsec = (hb[1] << 16) | hb[0]; in bcm_ptp_get_framesync_ts()
219 struct timespec64 *ts, in bcm_ptp_framesync_ts() argument
238 bcm_ptp_get_framesync_ts(phydev, ts); in bcm_ptp_framesync_ts()
249 struct timespec64 *ts, in bcm_ptp_gettimex() argument
256 err = bcm_ptp_framesync_ts(priv->phydev, sts, ts, priv->nse_ctrl); in bcm_ptp_gettimex()
263 const struct timespec64 *ts) in bcm_ptp_settime_locked() argument
272 bcm_phy_write_exp(phydev, TIME_CODE_0, ts->tv_nsec); in bcm_ptp_settime_locked()
273 bcm_phy_write_exp(phydev, TIME_CODE_1, ts->tv_nsec >> 16); in bcm_ptp_settime_locked()
274 bcm_phy_write_exp(phydev, TIME_CODE_2, ts->tv_sec); in bcm_ptp_settime_locked()
275 bcm_phy_write_exp(phydev, TIME_CODE_3, ts->tv_sec >> 16); in bcm_ptp_settime_locked()
276 bcm_phy_write_exp(phydev, TIME_CODE_4, ts->tv_sec >> 32); in bcm_ptp_settime_locked()
279 ns = timespec64_to_ns(ts); in bcm_ptp_settime_locked()
296 const struct timespec64 *ts) in bcm_ptp_settime() argument
302 err = bcm_ptp_settime_locked(priv, ts); in bcm_ptp_settime()
311 struct timespec64 ts; in bcm_ptp_adjtime_locked() local
315 err = bcm_ptp_framesync_ts(priv->phydev, NULL, &ts, priv->nse_ctrl); in bcm_ptp_adjtime_locked()
317 ns = timespec64_to_ns(&ts) + delta_ns; in bcm_ptp_adjtime_locked()
318 ts = ns_to_timespec64(ns); in bcm_ptp_adjtime_locked()
319 err = bcm_ptp_settime_locked(priv, &ts); in bcm_ptp_adjtime_locked()
422 u16 ts[4], reg; in bcm_ptp_get_tstamp() local
435 ts[0] = bcm_phy_read_exp(phydev, TS_REG_0); in bcm_ptp_get_tstamp()
436 ts[1] = bcm_phy_read_exp(phydev, TS_REG_1); in bcm_ptp_get_tstamp()
437 ts[2] = bcm_phy_read_exp(phydev, TS_REG_2); in bcm_ptp_get_tstamp()
438 ts[3] = bcm_phy_read_exp(phydev, TS_REG_3); in bcm_ptp_get_tstamp()
452 sec = (ts[3] << 16) | ts[2]; in bcm_ptp_get_tstamp()
453 nsec = (ts[1] << 16) | ts[0]; in bcm_ptp_get_tstamp()
541 struct timespec64 ts; in bcm_ptp_perout_work() local
553 bcm_ptp_framesync_ts(phydev, NULL, &ts, priv->nse_ctrl); in bcm_ptp_perout_work()
556 next = NSEC_PER_SEC - ts.tv_nsec; in bcm_ptp_perout_work()
557 ts.tv_sec += next < NSEC_PER_MSEC ? 2 : 1; in bcm_ptp_perout_work()
558 ts.tv_nsec = 0; in bcm_ptp_perout_work()
560 ns = timespec64_to_ns(&ts); in bcm_ptp_perout_work()
638 struct timespec64 ts; in bcm_ptp_extts_work() local
653 bcm_ptp_get_framesync_ts(phydev, &ts); in bcm_ptp_extts_work()
657 event.timestamp = timespec64_to_ns(&ts); in bcm_ptp_extts_work()