Home
last modified time | relevance | path

Searched +full:ptp +full:- +full:timer (Results 1 – 25 of 182) sorted by relevance

12345678

/openbmc/linux/Documentation/devicetree/bindings/net/
H A Dintel,ixp46x-ptp-timer.yaml1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
4 ---
5 $id: http://devicetree.org/schemas/net/intel,ixp46x-ptp-timer.yaml#
6 $schema: http://devicetree.org/meta-schemas/core.yaml#
8 title: Intel IXP46x PTP Timer (TSYNC)
11 - Linus Walleij <linus.walleij@linaro.org>
14 The Intel IXP46x PTP timer is known in the manual as IEEE1588 Hardware
15 Assist and Time Synchronization Hardware Assist TSYNC provides a PTP
16 timer. It exists in the Intel IXP45x and IXP46x XScale SoCs.
20 const: intel,ixp46x-ptp-timer
[all …]
H A Dfsl,fman-dtsec.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/net/fsl,fman-dtsec.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Madalin Bucur <madalin.bucur@nxp.com>
15 10/100/1000 MBit/s speeds, and the 10-Gigabit Ethernet Media Access Controller
22 - fsl,fman-dtsec
23 - fsl,fman-xgec
24 - fsl,fman-memac
26 cell-index:
[all …]
/openbmc/linux/drivers/net/ethernet/mellanox/mlx5/core/lib/
H A Dclock.c14 * - Redistributions of source code must retain the above
18 * - Redistributions in binary form must reproduce the above
37 #include <rdma/mlx5-abi.h>
72 MLX5_MTUTC_OPERATION_ADJUST_TIME_EXTENDED_MIN = -200000,
107 * dev_freq_khz = 2^(shift_constant - 16) in mlx5_ptp_shift_constant()
118 static s32 mlx5_ptp_getmaxphase(struct ptp_clock_info *ptp) in mlx5_ptp_getmaxphase() argument
120 struct mlx5_clock *clock = container_of(ptp, struct mlx5_clock, ptp_info); in mlx5_ptp_getmaxphase()
132 s64 max = mlx5_ptp_getmaxphase(&mdev->clock.ptp_info); in mlx5_is_mtutc_time_adj_cap()
134 if (delta < -max || delta > max) in mlx5_is_mtutc_time_adj_cap()
145 return -EOPNOTSUPP; in mlx5_set_mtutc()
[all …]
H A Dclock.h14 * - Redistributions of source code must retain the above
18 * - Redistributions in binary form must reproduce the above
62 return mdev->clock.ptp ? ptp_clock_index(mdev->clock.ptp) : -1; in mlx5_clock_get_ptp_index()
68 struct mlx5_timer *timer = &clock->timer; in mlx5_timecounter_cyc2time() local
73 seq = read_seqbegin(&clock->lock); in mlx5_timecounter_cyc2time()
74 nsec = timecounter_cyc2time(&timer->tc, timestamp); in mlx5_timecounter_cyc2time()
75 } while (read_seqretry(&clock->lock, seq)); in mlx5_timecounter_cyc2time()
94 return -1; in mlx5_clock_get_ptp_index()
/openbmc/linux/include/linux/fsl/
H A Dptp_qoriq.h1 // SPDX-License-Identifier: GPL-2.0
14 * qoriq ptp registers
17 u32 tmr_ctrl; /* Timer control register */
19 u32 tmr_temask; /* Timer event mask register */
21 u32 tmr_pemask; /* Timer event mask register */
23 u32 tmr_cnt_h; /* Timer counter high register */
24 u32 tmr_cnt_l; /* Timer counter low register */
25 u32 tmr_add; /* Timer drift compensation addend register */
26 u32 tmr_acc; /* Timer accumulator register */
27 u32 tmr_prsc; /* Timer prescale */
[all …]
/openbmc/linux/Documentation/devicetree/bindings/ptp/
H A Dptp-qoriq.txt1 * Freescale QorIQ 1588 timer based PTP clock
5 - compatible Should be "fsl,etsec-ptp" for eTSEC
6 Should be "fsl,fman-ptp-timer" for DPAA FMan
7 Should be "fsl,dpaa2-ptp" for DPAA2
8 Should be "fsl,enetc-ptp" for ENETC
9 - reg Offset and length of the register set for the device
10 - interrupts There should be at least two interrupts. Some devices
11 have as many as four PTP related interrupts.
15 - fsl,cksel Timer reference clock source.
16 - fsl,tclk-period Timer reference clock period in nanoseconds.
[all …]
/openbmc/linux/drivers/net/ethernet/freescale/
H A Dfec_ptp.c1 // SPDX-License-Identifier: GPL-2.0
3 * Fast Ethernet Controller (ENET) PTP driver for MX6x.
93 * fec_ptp_read - read raw cycle counter (to be used by time counter)
106 tempval = readl(fep->hwp + FEC_ATIME_CTRL); in fec_ptp_read()
108 writel(tempval, fep->hwp + FEC_ATIME_CTRL); in fec_ptp_read()
110 if (fep->quirks & FEC_QUIRK_BUG_CAPTURE) in fec_ptp_read()
113 return readl(fep->hwp + FEC_ATIME); in fec_ptp_read()
121 * This function enble the PPS ouput on the timer channel.
130 spin_lock_irqsave(&fep->tmreg_lock, flags); in fec_ptp_enable_pps()
132 if (fep->pps_enable == enable) { in fec_ptp_enable_pps()
[all …]
/openbmc/linux/drivers/net/ethernet/stmicro/stmmac/
H A Dstmmac_ptp.h1 /* SPDX-License-Identifier: GPL-2.0-only */
3 PTP Header file
18 /* IEEE 1588 PTP register offsets */
20 #define PTP_SSIR 0x04 /* Sub-Second Increment Reg */
27 #define PTP_ATNR 0x48 /* Auxiliary Timestamp - Nanoseconds Reg */
28 #define PTP_ATSR 0x4c /* Auxiliary Timestamp - Seconds Reg */
37 #define PTP_DIGITAL_ROLLOVER_MODE 0x3B9ACA00 /* 10e9-1 ns */
40 /* PTP Timestamp control register defines */
49 /* Enable PTP packet Processing for Version 2 Format */
51 /* Enable Processing of PTP over Ethernet Frames */
[all …]
/openbmc/linux/drivers/ptp/
H A DKconfig1 # SPDX-License-Identifier: GPL-2.0-only
3 # PTP clock support configuration
6 menu "PTP clock support"
9 tristate "PTP clock support"
17 standard defines a Precision Time Protocol (PTP), which can
23 This driver adds support for PTP clocks as character
24 devices. If you want to use a PTP clock, then you should
28 will be called ptp.
37 into vmlinux while the PTP support itself is in a loadable
39 If PTP support is disabled, this dependency will still be
[all …]
H A Dptp_qoriq.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * PTP 1588 clock for Freescale QorIQ 1588 timer
26 /* Caller must hold ptp_qoriq->lock. */
29 struct ptp_qoriq_registers *regs = &ptp_qoriq->regs; in tmr_cnt_read()
33 lo = ptp_qoriq->read(&regs->ctrl_regs->tmr_cnt_l); in tmr_cnt_read()
34 hi = ptp_qoriq->read(&regs->ctrl_regs->tmr_cnt_h); in tmr_cnt_read()
40 /* Caller must hold ptp_qoriq->lock. */
43 struct ptp_qoriq_registers *regs = &ptp_qoriq->regs; in tmr_cnt_write()
47 ptp_qoriq->write(&regs->ctrl_regs->tmr_cnt_l, lo); in tmr_cnt_write()
48 ptp_qoriq->write(&regs->ctrl_regs->tmr_cnt_h, hi); in tmr_cnt_write()
[all …]
H A Dptp_pch.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * PTP 1588 clock using the EG20T PCH
6 * Copyright (C) 2011-2012 LAPIS SEMICONDUCTOR Co., LTD.
15 #include <linux/io-64-nonatomic-lo-hi.h>
16 #include <linux/io-64-nonatomic-hi-lo.h>
43 * struct pch_ts_regs - IEEE 1588 registers
109 * struct pch_dev - Driver private data
124 * struct pch_params - 1588 module parameter
142 val = ioread32(&chip->regs->ts_sel) | (PCH_ECS_ETH); in pch_eth_enable_set()
143 iowrite32(val, (&chip->regs->ts_sel)); in pch_eth_enable_set()
[all …]
/openbmc/linux/drivers/net/ethernet/mellanox/mlx4/
H A Den_clock.c14 * - Redistributions of source code must retain the above
18 * - Redistributions in binary form must reproduce the above
39 /* mlx4_en_read_clock - read raw cycle counter (to be used by time counter)
45 struct mlx4_dev *dev = mdev->dev; in mlx4_en_read_clock()
47 return mlx4_read_clock(dev) & tc->mask; in mlx4_en_read_clock()
55 lo = (u64)be16_to_cpu(ts_cqe->timestamp_lo); in mlx4_en_get_cqe_ts()
56 hi = ((u64)be32_to_cpu(ts_cqe->timestamp_hi) + !lo) << 16; in mlx4_en_get_cqe_ts()
67 seq = read_seqbegin(&mdev->clock_lock); in mlx4_en_get_hwtstamp()
68 nsec = timecounter_cyc2time(&mdev->clock, timestamp); in mlx4_en_get_hwtstamp()
69 } while (read_seqretry(&mdev->clock_lock, seq)); in mlx4_en_get_hwtstamp()
[all …]
/openbmc/linux/drivers/net/ethernet/xscale/
H A Dptp_ixp46x.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * PTP 1588 clock using the IXP46X
46 lo = __raw_readl(&regs->systime_lo); in ixp_systime_read()
47 hi = __raw_readl(&regs->systime_hi); in ixp_systime_read()
64 __raw_writel(lo, &regs->systime_lo); in ixp_systime_write()
65 __raw_writel(hi, &regs->systime_hi); in ixp_systime_write()
75 struct ixp46x_ts_regs *regs = ixp_clock->regs; in isr()
79 val = __raw_readl(&regs->event); in isr()
83 if (ixp_clock->exts0_enabled) { in isr()
84 hi = __raw_readl(&regs->asms_hi); in isr()
[all …]
/openbmc/linux/drivers/net/ethernet/cadence/
H A Dmacb_ptp.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * 1588 PTP support for Cadence GEM device.
5 * Copyright (C) 2017 Cadence Design Systems - https://www.cadence.com
26 #define GEM_PTP_TIMER_NAME "gem-ptp-timer"
31 if (bp->hw_dma_cap == HW_DMA_CAP_PTP) in macb_ptp_desc()
34 if (bp->hw_dma_cap == HW_DMA_CAP_64B_PTP) in macb_ptp_desc()
41 static int gem_tsu_get_time(struct ptp_clock_info *ptp, struct timespec64 *ts, in gem_tsu_get_time() argument
44 struct macb *bp = container_of(ptp, struct macb, ptp_clock_info); in gem_tsu_get_time()
49 spin_lock_irqsave(&bp->tsu_clk_lock, flags); in gem_tsu_get_time()
59 /* if so, use later read & re-read seconds in gem_tsu_get_time()
[all …]
H A Dmacb.h1 /* SPDX-License-Identifier: GPL-2.0-only */
5 * Copyright (C) 2004-2006 Atmel Corporation
99 #define GEM_RXPTPUNI 0x00D4 /* PTP RX Unicast address */
100 #define GEM_TXPTPUNI 0x00D8 /* PTP TX Unicast address */
101 #define GEM_EFTSH 0x00e8 /* PTP Event Frame Transmitted Seconds Register 47:32 */
102 #define GEM_EFRSH 0x00ec /* PTP Event Frame Received Seconds Register 47:32 */
103 #define GEM_PEFTSH 0x00f0 /* PTP Peer Event Frame Transmitted Seconds Register 47:32 */
104 #define GEM_PEFRSH 0x00f4 /* PTP Peer Event Frame Received Seconds Register 47:32 */
113 #define GEM_TX65CNT 0x011c /* 65-127 byte Frames TX counter */
114 #define GEM_TX128CNT 0x0120 /* 128-255 byte Frames TX counter */
[all …]
/openbmc/linux/drivers/net/ethernet/chelsio/cxgb4/
H A Dcxgb4_ptp.c2 * cxgb4_ptp.c:Chelsio PTP support for T5/T6
4 * Copyright (c) 2003-2017 Chelsio Communications, Inc. All rights reserved.
16 * - Redistributions of source code must retain the above
20 * - Redistributions in binary form must reproduce the above
54 * cxgb4_ptp_is_ptp_tx - determine whether TX packet is PTP or not
55 * @skb: skb of outgoing ptp request
63 return skb->len >= PTP_MIN_LENGTH && in cxgb4_ptp_is_ptp_tx()
64 skb->len <= PTP_IN_TRANSMIT_PACKET_MAXNUM && in cxgb4_ptp_is_ptp_tx()
65 likely(skb->protocol == htons(ETH_P_IP)) && in cxgb4_ptp_is_ptp_tx()
66 ip_hdr(skb)->protocol == IPPROTO_UDP && in cxgb4_ptp_is_ptp_tx()
[all …]
/openbmc/linux/drivers/net/ethernet/intel/e1000e/
H A Dptp.c1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 1999 - 2018 Intel Corporation. */
4 /* PTP 1588 Hardware Clock (PHC)
5 * Derived from PTP Hardware Clock driver for Intel 82576 and 82580 (igb)
18 * e1000e_phc_adjfine - adjust the frequency of the hardware clock
19 * @ptp: ptp clock structure
27 static int e1000e_phc_adjfine(struct ptp_clock_info *ptp, long delta) in e1000e_phc_adjfine() argument
29 struct e1000_adapter *adapter = container_of(ptp, struct e1000_adapter, in e1000e_phc_adjfine()
31 struct e1000_hw *hw = &adapter->hw; in e1000e_phc_adjfine()
42 spin_lock_irqsave(&adapter->systim_lock, flags); in e1000e_phc_adjfine()
[all …]
/openbmc/linux/drivers/net/ethernet/freescale/enetc/
H A DKconfig1 # SPDX-License-Identifier: GPL-2.0
8 If compiled as module (M), the module name is fsl-enetc-core.
25 If compiled as module (M), the module name is fsl-enetc.
38 If compiled as module (M), the module name is fsl-enetc-vf.
46 If compiled as module (M), the module name is fsl-enetc-ierb.
55 If compiled as module (M), the module name is fsl-enetc-mdio.
58 tristate "ENETC PTP clock driver"
62 This driver adds support for using the ENETC 1588 timer
63 as a PTP clock. This clock is only useful if your PTP
64 programs are getting hardware time stamps on the PTP Ethernet
[all …]
/openbmc/linux/drivers/net/ethernet/intel/igc/
H A Digc_ptp.c1 // SPDX-License-Identifier: GPL-2.0
26 struct igc_hw *hw = &adapter->hw; in igc_ptp_read()
33 ts->tv_sec = sec; in igc_ptp_read()
34 ts->tv_nsec = nsec; in igc_ptp_read()
40 struct igc_hw *hw = &adapter->hw; in igc_ptp_write_i225()
42 wr32(IGC_SYSTIML, ts->tv_nsec); in igc_ptp_write_i225()
43 wr32(IGC_SYSTIMH, ts->tv_sec); in igc_ptp_write_i225()
46 static int igc_ptp_adjfine_i225(struct ptp_clock_info *ptp, long scaled_ppm) in igc_ptp_adjfine_i225() argument
48 struct igc_adapter *igc = container_of(ptp, struct igc_adapter, in igc_ptp_adjfine_i225()
50 struct igc_hw *hw = &igc->hw; in igc_ptp_adjfine_i225()
[all …]
/openbmc/linux/drivers/net/ethernet/intel/ice/
H A Dice_ptp.c1 // SPDX-License-Identifier: GPL-2.0
116 return -EINVAL; in ice_ptp_set_sma_config_e810t()
121 return -EINVAL; in ice_ptp_set_sma_config_e810t()
181 * @info: the driver's PTP info structure
193 struct ice_hw *hw = &pf->hw; in ice_ptp_set_sma_e810t()
197 return -EOPNOTSUPP; in ice_ptp_set_sma_e810t()
222 * @info: the driver's PTP info structure
237 return -EOPNOTSUPP; in ice_verify_pin_e810t()
245 return -EOPNOTSUPP; in ice_verify_pin_e810t()
249 return -EOPNOTSUPP; in ice_verify_pin_e810t()
[all …]
H A Dice_ptp_hw.c1 // SPDX-License-Identifier: GPL-2.0
16 * +---------------+ +---------------+ +---------------+
18 * +---------------+ +---------------+ +---------------+
24 * +---------------+ +---------------+
26 * +---------------+ +---------------+
37 * - 823.4375 MHz
38 * - 783.36 MHz
39 * - 796.875 MHz
40 * - 816 MHz
41 * - 830.078125 MHz
[all …]
/openbmc/linux/drivers/net/ethernet/freescale/dpaa2/
H A DKconfig1 # SPDX-License-Identifier: GPL-2.0-only
21 Enable Priority-Based Flow Control (PFC) support for DPAA2 Ethernet
26 tristate "Freescale DPAA2 PTP Clock"
30 This driver adds support for using the DPAA2 1588 timer module
31 as a PTP clock.
/openbmc/linux/drivers/net/ethernet/renesas/
H A Dravb_ptp.c1 // SPDX-License-Identifier: GPL-2.0+
2 /* PTP 1588 clock using the Renesas Ethernet AVB
4 * Copyright (C) 2013-2015 Renesas Electronics Corporation
6 * Copyright (C) 2015-2016 Cogent Embedded, Inc. <source@cogentembedded.com>
13 struct net_device *ndev = priv->ndev; in ravb_ptp_tcr_request()
27 struct net_device *ndev = priv->ndev; in ravb_ptp_time_read()
34 ts->tv_nsec = ravb_read(ndev, GCT0); in ravb_ptp_time_read()
35 ts->tv_sec = ravb_read(ndev, GCT1) | in ravb_ptp_time_read()
45 struct net_device *ndev = priv->ndev; in ravb_ptp_time_write()
55 return -EBUSY; in ravb_ptp_time_write()
[all …]
/openbmc/linux/arch/arm/boot/dts/intel/ixp/
H A Dintel-ixp45x-ixp46x.dtsi1 // SPDX-License-Identifier: ISC
8 #include "intel-ixp4xx.dtsi"
13 compatible = "intel,ixp46x-expansion-bus-controller", "syscon";
19 compatible = "intel,ixp46x-rng";
23 interrupt-controller@c8003000 {
24 compatible = "intel,ixp43x-interrupt";
32 compatible = "intel,ixp4xx-udc";
39 compatible = "intel,ixp4xx-i2c";
47 compatible = "intel,ixp4xx-ethernet";
52 queue-rx = <&qmgr 0>;
[all …]
/openbmc/linux/arch/arm64/boot/dts/freescale/
H A Dqoriq-fman3-0.dtsi1 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
5 * Copyright 2012-2015 Freescale Semiconductor Inc.
9 #include <dt-bindings/clock/fsl,qoriq-clockgen.h>
12 #address-cells = <1>;
13 #size-cells = <1>;
14 cell-index = <0>;
21 clock-names = "fmanclk";
22 fsl,qman-channel-range = <0x800 0x10>;
23 ptimer-handle = <&ptp_timer0>;
24 dma-coherent;
[all …]

12345678