Lines Matching refs:igb
78 struct igb_adapter *igb = container_of(cc, struct igb_adapter, cc); in igb_ptp_read_82576() local
79 struct e1000_hw *hw = &igb->hw; in igb_ptp_read_82576()
95 struct igb_adapter *igb = container_of(cc, struct igb_adapter, cc); in igb_ptp_read_82580() local
96 struct e1000_hw *hw = &igb->hw; in igb_ptp_read_82580()
196 struct igb_adapter *igb = container_of(ptp, struct igb_adapter, in igb_ptp_adjfine_82576() local
198 struct e1000_hw *hw = &igb->hw; in igb_ptp_adjfine_82576()
210 struct igb_adapter *igb = container_of(ptp, struct igb_adapter, in igb_ptp_adjfine_82580() local
212 struct e1000_hw *hw = &igb->hw; in igb_ptp_adjfine_82580()
230 struct igb_adapter *igb = container_of(ptp, struct igb_adapter, in igb_ptp_adjtime_82576() local
234 spin_lock_irqsave(&igb->tmreg_lock, flags); in igb_ptp_adjtime_82576()
235 timecounter_adjtime(&igb->tc, delta); in igb_ptp_adjtime_82576()
236 spin_unlock_irqrestore(&igb->tmreg_lock, flags); in igb_ptp_adjtime_82576()
243 struct igb_adapter *igb = container_of(ptp, struct igb_adapter, in igb_ptp_adjtime_i210() local
248 spin_lock_irqsave(&igb->tmreg_lock, flags); in igb_ptp_adjtime_i210()
250 igb_ptp_read_i210(igb, &now); in igb_ptp_adjtime_i210()
252 igb_ptp_write_i210(igb, (const struct timespec64 *)&now); in igb_ptp_adjtime_i210()
254 spin_unlock_irqrestore(&igb->tmreg_lock, flags); in igb_ptp_adjtime_i210()
263 struct igb_adapter *igb = container_of(ptp, struct igb_adapter, in igb_ptp_gettimex_82576() local
265 struct e1000_hw *hw = &igb->hw; in igb_ptp_gettimex_82576()
270 spin_lock_irqsave(&igb->tmreg_lock, flags); in igb_ptp_gettimex_82576()
277 ns = timecounter_cyc2time(&igb->tc, ((u64)hi << 32) | lo); in igb_ptp_gettimex_82576()
279 spin_unlock_irqrestore(&igb->tmreg_lock, flags); in igb_ptp_gettimex_82576()
290 struct igb_adapter *igb = container_of(ptp, struct igb_adapter, in igb_ptp_gettimex_82580() local
292 struct e1000_hw *hw = &igb->hw; in igb_ptp_gettimex_82580()
297 spin_lock_irqsave(&igb->tmreg_lock, flags); in igb_ptp_gettimex_82580()
305 ns = timecounter_cyc2time(&igb->tc, ((u64)hi << 32) | lo); in igb_ptp_gettimex_82580()
307 spin_unlock_irqrestore(&igb->tmreg_lock, flags); in igb_ptp_gettimex_82580()
318 struct igb_adapter *igb = container_of(ptp, struct igb_adapter, in igb_ptp_gettimex_i210() local
320 struct e1000_hw *hw = &igb->hw; in igb_ptp_gettimex_i210()
323 spin_lock_irqsave(&igb->tmreg_lock, flags); in igb_ptp_gettimex_i210()
331 spin_unlock_irqrestore(&igb->tmreg_lock, flags); in igb_ptp_gettimex_i210()
339 struct igb_adapter *igb = container_of(ptp, struct igb_adapter, in igb_ptp_settime_82576() local
346 spin_lock_irqsave(&igb->tmreg_lock, flags); in igb_ptp_settime_82576()
348 timecounter_init(&igb->tc, &igb->cc, ns); in igb_ptp_settime_82576()
350 spin_unlock_irqrestore(&igb->tmreg_lock, flags); in igb_ptp_settime_82576()
358 struct igb_adapter *igb = container_of(ptp, struct igb_adapter, in igb_ptp_settime_i210() local
362 spin_lock_irqsave(&igb->tmreg_lock, flags); in igb_ptp_settime_i210()
364 igb_ptp_write_i210(igb, ts); in igb_ptp_settime_i210()
366 spin_unlock_irqrestore(&igb->tmreg_lock, flags); in igb_ptp_settime_i210()
387 static void igb_pin_extts(struct igb_adapter *igb, int chan, int pin) in igb_pin_extts() argument
398 struct e1000_hw *hw = &igb->hw; in igb_pin_extts()
423 static void igb_pin_perout(struct igb_adapter *igb, int chan, int pin, int freq) in igb_pin_perout() argument
454 struct e1000_hw *hw = &igb->hw; in igb_pin_perout()
492 struct igb_adapter *igb = in igb_ptp_feature_enable_82580() local
496 struct e1000_hw *hw = &igb->hw; in igb_ptp_feature_enable_82580()
513 pin = ptp_find_pin(igb->ptp_clock, PTP_PF_EXTTS, in igb_ptp_feature_enable_82580()
525 spin_lock_irqsave(&igb->tmreg_lock, flags); in igb_ptp_feature_enable_82580()
529 igb_pin_extts(igb, rq->extts.index, pin); in igb_ptp_feature_enable_82580()
538 spin_unlock_irqrestore(&igb->tmreg_lock, flags); in igb_ptp_feature_enable_82580()
547 pin = ptp_find_pin(igb->ptp_clock, PTP_PF_PEROUT, in igb_ptp_feature_enable_82580()
570 spin_lock_irqsave(&igb->tmreg_lock, flags); in igb_ptp_feature_enable_82580()
588 now = timecounter_cyc2time(&igb->tc, systim); in igb_ptp_feature_enable_82580()
618 igb_pin_perout(igb, i, pin, 0); in igb_ptp_feature_enable_82580()
619 igb->perout[i].start.tv_sec = start.tv_sec; in igb_ptp_feature_enable_82580()
620 igb->perout[i].start.tv_nsec = start.tv_nsec; in igb_ptp_feature_enable_82580()
621 igb->perout[i].period.tv_sec = ts.tv_sec; in igb_ptp_feature_enable_82580()
622 igb->perout[i].period.tv_nsec = ts.tv_nsec; in igb_ptp_feature_enable_82580()
631 spin_unlock_irqrestore(&igb->tmreg_lock, flags); in igb_ptp_feature_enable_82580()
644 struct igb_adapter *igb = in igb_ptp_feature_enable_i210() local
646 struct e1000_hw *hw = &igb->hw; in igb_ptp_feature_enable_i210()
669 pin = ptp_find_pin(igb->ptp_clock, PTP_PF_EXTTS, in igb_ptp_feature_enable_i210()
681 spin_lock_irqsave(&igb->tmreg_lock, flags); in igb_ptp_feature_enable_i210()
685 igb_pin_extts(igb, rq->extts.index, pin); in igb_ptp_feature_enable_i210()
694 spin_unlock_irqrestore(&igb->tmreg_lock, flags); in igb_ptp_feature_enable_i210()
703 pin = ptp_find_pin(igb->ptp_clock, PTP_PF_PEROUT, in igb_ptp_feature_enable_i210()
742 spin_lock_irqsave(&igb->tmreg_lock, flags); in igb_ptp_feature_enable_i210()
754 igb_pin_perout(igb, i, pin, use_freq); in igb_ptp_feature_enable_i210()
755 igb->perout[i].start.tv_sec = rq->perout.start.sec; in igb_ptp_feature_enable_i210()
756 igb->perout[i].start.tv_nsec = rq->perout.start.nsec; in igb_ptp_feature_enable_i210()
757 igb->perout[i].period.tv_sec = ts.tv_sec; in igb_ptp_feature_enable_i210()
758 igb->perout[i].period.tv_nsec = ts.tv_nsec; in igb_ptp_feature_enable_i210()
768 spin_unlock_irqrestore(&igb->tmreg_lock, flags); in igb_ptp_feature_enable_i210()
772 spin_lock_irqsave(&igb->tmreg_lock, flags); in igb_ptp_feature_enable_i210()
778 igb->pps_sys_wrap_on = !!on; in igb_ptp_feature_enable_i210()
780 spin_unlock_irqrestore(&igb->tmreg_lock, flags); in igb_ptp_feature_enable_i210()
848 struct igb_adapter *igb = in igb_ptp_overflow_check() local
854 ns = timecounter_read(&igb->tc); in igb_ptp_overflow_check()
860 schedule_delayed_work(&igb->ptp_overflow_work, in igb_ptp_overflow_check()