Lines Matching +full:0 +full:x08ec

19 #define SLICE_CTRL		0x0810
20 #define SLICE_TX_EN BIT(0)
22 #define TX_EVENT_MODE 0x0811
23 #define MODE_TX_UPDATE_CF BIT(0)
25 #define MODE_TX_REPLACE_TS GENMASK(1, 0)
26 #define RX_EVENT_MODE 0x0819
27 #define MODE_RX_UPDATE_CF BIT(0)
29 #define MODE_RX_INSERT_TS_64 GENMASK(1, 0)
31 #define MODE_EVT_SHIFT_SYNC 0
36 #define MODE_SEL_SHIFT_PORT 0
46 #define TX_TS_CAPTURE 0x0821
47 #define TX_TS_CAP_EN BIT(0)
48 #define RX_TS_CAPTURE 0x0822
49 #define RX_TS_CAP_EN BIT(0)
51 #define TIME_CODE_0 0x0854
52 #define TIME_CODE_1 0x0855
53 #define TIME_CODE_2 0x0856
54 #define TIME_CODE_3 0x0857
55 #define TIME_CODE_4 0x0858
57 #define DPLL_SELECT 0x085b
60 #define SHADOW_CTRL 0x085c
61 #define SHADOW_LOAD 0x085d
66 #define INTR_MASK 0x085e
67 #define INTR_STATUS 0x085f
68 #define INTC_FSYNC BIT(0)
71 #define NCO_FREQ_LSB 0x0873
72 #define NCO_FREQ_MSB 0x0874
74 #define NCO_TIME_0 0x0875
75 #define NCO_TIME_1 0x0876
76 #define NCO_TIME_2_CTRL 0x0877
79 #define SYNC_OUT_0 0x0878
80 #define SYNC_OUT_1 0x0879
81 #define SYNC_OUT_2 0x087a
83 #define SYNC_IN_DIVIDER 0x087b
85 #define SYNOUT_TS_0 0x087c
86 #define SYNOUT_TS_1 0x087d
87 #define SYNOUT_TS_2 0x087e
89 #define NSE_CTRL 0x087f
97 #define NSE_ONESHOT_EN BIT(0)
98 #define NSE_SYNC_OUT_MASK GENMASK(1, 0)
100 #define TS_READ_CTRL 0x0885
101 #define TS_READ_START BIT(0)
104 #define HB_REG_0 0x0886
105 #define HB_REG_1 0x0887
106 #define HB_REG_2 0x0888
107 #define HB_REG_3 0x08ec
108 #define HB_REG_4 0x08ed
109 #define HB_STAT_CTRL 0x088e
114 #define TS_REG_0 0x0889
115 #define TS_REG_1 0x088a
116 #define TS_REG_2 0x088b
117 #define TS_REG_3 0x08c4
119 #define TS_INFO_0 0x088c
120 #define TS_INFO_1 0x088d
122 #define TIMECODE_CTRL 0x08c3
123 #define TX_TIMECODE_SEL GENMASK(7, 0)
126 #define TIME_SYNC 0x0ff5
127 #define TIME_SYNC_EN BIT(0)
184 hb[0] = bcm_phy_read_exp(phydev, HB_REG_0); in bcm_ptp_get_framesync_ts()
190 bcm_phy_write_exp(phydev, HB_STAT_CTRL, 0); in bcm_ptp_get_framesync_ts()
193 ts->tv_nsec = (hb[1] << 16) | hb[0]; in bcm_ptp_get_framesync_ts()
213 /* trigger framesync - must have 0->1 transition. */ in bcm_ptp_framesync()
235 for (i = 0; i < 10; i++) { in bcm_ptp_framesync_ts()
245 return reg & INTC_FSYNC ? 0 : -ETIMEDOUT; in bcm_ptp_framesync_ts()
282 bcm_phy_write_exp(phydev, NCO_TIME_2_CTRL, (ns >> 36) & 0xfff); in bcm_ptp_settime_locked()
292 return 0; in bcm_ptp_settime_locked()
337 * The frequency adjustment base is 0x8000 0000, or 8*2^28.
347 int neg_adj = 0; in bcm_ptp_adjfine()
352 if (scaled_ppm < 0) { in bcm_ptp_adjfine()
376 bcm_phy_write_exp(priv->phydev, SHADOW_LOAD, 0); in bcm_ptp_adjfine()
382 return 0; in bcm_ptp_adjfine()
428 if ((reg & INTC_SOP) == 0) { in bcm_ptp_get_tstamp()
435 ts[0] = bcm_phy_read_exp(phydev, TS_REG_0); in bcm_ptp_get_tstamp()
448 bcm_phy_write_exp(phydev, TS_READ_CTRL, 0); in bcm_ptp_get_tstamp()
453 nsec = (ts[1] << 16) | ts[0]; in bcm_ptp_get_tstamp()
485 memset(&hwts, 0, sizeof(hwts)); in bcm_ptp_match_tstamp()
523 return 0; in bcm_ptp_cancel_func()
533 return 0; in bcm_ptp_cancel_func()
558 ts.tv_nsec = 0; in bcm_ptp_perout_work()
562 /* force 0->1 transition for ONESHOT */ in bcm_ptp_perout_work()
566 bcm_phy_write_exp(phydev, SYNOUT_TS_0, ns & 0xfff0); in bcm_ptp_perout_work()
595 if (req->period.sec != 1 || req->period.nsec != 0) in bcm_ptp_perout_locked()
617 val = ((pulse & 0x3) << 14) | ((period >> 16) & 0x3fff); in bcm_ptp_perout_locked()
620 val = ((pulse >> 2) & 0x7f) | (pulse << 7); in bcm_ptp_perout_locked()
628 schedule_delayed_work(&priv->pin_work, 0); in bcm_ptp_perout_locked()
630 return 0; in bcm_ptp_perout_locked()
651 if ((reg & INTC_FSYNC) == 0) in bcm_ptp_extts_work()
656 event.index = 0; in bcm_ptp_extts_work()
684 schedule_delayed_work(&priv->pin_work, 0); in bcm_ptp_extts_locked()
686 return 0; in bcm_ptp_extts_locked()
727 return 0; in bcm_ptp_verify()
775 ptp_schedule_worker(priv->ptp_clock, 0); in bcm_ptp_txtstamp()
814 ctrl = priv->hwts_rx ? SLICE_RX_EN : 0; in bcm_ptp_hwtstamp()
815 ctrl |= priv->tx_type != HWTSTAMP_TX_OFF ? SLICE_TX_EN : 0; in bcm_ptp_hwtstamp()
841 return 0; in bcm_ptp_hwtstamp()
863 return 0; in bcm_ptp_ts_info()