Searched refs:ptp (Results 1 - 64 of 64) sorted by relevance

/linux-4.4.14/drivers/ptp/
H A DMakefile5 ptp-y := ptp_clock.o ptp_chardev.o ptp_sysfs.o
6 obj-$(CONFIG_PTP_1588_CLOCK) += ptp.o
H A Dptp_clock.c109 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); ptp_clock_settime() local
112 return ptp->info->settime64(ptp->info, &ts); ptp_clock_settime()
117 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); ptp_clock_gettime() local
121 err = ptp->info->gettime64(ptp->info, &ts); ptp_clock_gettime()
129 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); ptp_clock_adjtime() local
133 ops = ptp->info; ptp_clock_adjtime()
157 ptp->dialed_frequency = tx->freq; ptp_clock_adjtime()
159 tx->freq = ptp->dialed_frequency; ptp_clock_adjtime()
180 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); delete_ptp_clock() local
182 mutex_destroy(&ptp->tsevq_mux); delete_ptp_clock()
183 mutex_destroy(&ptp->pincfg_mux); delete_ptp_clock()
184 ida_simple_remove(&ptp_clocks_map, ptp->index); delete_ptp_clock()
185 kfree(ptp); delete_ptp_clock()
193 struct ptp_clock *ptp; ptp_clock_register() local
201 ptp = kzalloc(sizeof(struct ptp_clock), GFP_KERNEL); ptp_clock_register()
202 if (ptp == NULL) ptp_clock_register()
211 ptp->clock.ops = ptp_clock_ops; ptp_clock_register()
212 ptp->clock.release = delete_ptp_clock; ptp_clock_register()
213 ptp->info = info; ptp_clock_register()
214 ptp->devid = MKDEV(major, index); ptp_clock_register()
215 ptp->index = index; ptp_clock_register()
216 spin_lock_init(&ptp->tsevq.lock); ptp_clock_register()
217 mutex_init(&ptp->tsevq_mux); ptp_clock_register()
218 mutex_init(&ptp->pincfg_mux); ptp_clock_register()
219 init_waitqueue_head(&ptp->tsev_wq); ptp_clock_register()
222 ptp->dev = device_create(ptp_class, parent, ptp->devid, ptp, ptp_clock_register()
223 "ptp%d", ptp->index); ptp_clock_register()
224 if (IS_ERR(ptp->dev)) ptp_clock_register()
227 dev_set_drvdata(ptp->dev, ptp); ptp_clock_register()
229 err = ptp_populate_sysfs(ptp); ptp_clock_register()
237 snprintf(pps.name, PPS_MAX_NAME_LEN, "ptp%d", index); ptp_clock_register()
240 ptp->pps_source = pps_register_source(&pps, PTP_PPS_DEFAULTS); ptp_clock_register()
241 if (!ptp->pps_source) { ptp_clock_register()
248 err = posix_clock_register(&ptp->clock, ptp->devid); ptp_clock_register()
254 return ptp; ptp_clock_register()
257 if (ptp->pps_source) ptp_clock_register()
258 pps_unregister_source(ptp->pps_source); ptp_clock_register()
260 ptp_cleanup_sysfs(ptp); ptp_clock_register()
262 device_destroy(ptp_class, ptp->devid); ptp_clock_register()
264 mutex_destroy(&ptp->tsevq_mux); ptp_clock_register()
265 mutex_destroy(&ptp->pincfg_mux); ptp_clock_register()
267 kfree(ptp); ptp_clock_register()
273 int ptp_clock_unregister(struct ptp_clock *ptp) ptp_clock_unregister() argument
275 ptp->defunct = 1; ptp_clock_unregister()
276 wake_up_interruptible(&ptp->tsev_wq); ptp_clock_unregister()
279 if (ptp->pps_source) ptp_clock_unregister()
280 pps_unregister_source(ptp->pps_source); ptp_clock_unregister()
281 ptp_cleanup_sysfs(ptp); ptp_clock_unregister()
282 device_destroy(ptp_class, ptp->devid); ptp_clock_unregister()
284 posix_clock_unregister(&ptp->clock); ptp_clock_unregister()
289 void ptp_clock_event(struct ptp_clock *ptp, struct ptp_clock_event *event) ptp_clock_event() argument
299 enqueue_external_timestamp(&ptp->tsevq, event); ptp_clock_event()
300 wake_up_interruptible(&ptp->tsev_wq); ptp_clock_event()
305 pps_event(ptp->pps_source, &evt, PTP_PPS_EVENT, NULL); ptp_clock_event()
309 pps_event(ptp->pps_source, &event->pps_times, ptp_clock_event()
316 int ptp_clock_index(struct ptp_clock *ptp) ptp_clock_index() argument
318 return ptp->index; ptp_clock_index()
322 int ptp_find_pin(struct ptp_clock *ptp, ptp_find_pin() argument
328 mutex_lock(&ptp->pincfg_mux); ptp_find_pin()
329 for (i = 0; i < ptp->info->n_pins; i++) { ptp_find_pin()
330 if (ptp->info->pin_config[i].func == func && ptp_find_pin()
331 ptp->info->pin_config[i].chan == chan) { ptp_find_pin()
332 pin = &ptp->info->pin_config[i]; ptp_find_pin()
336 mutex_unlock(&ptp->pincfg_mux); ptp_find_pin()
355 ptp_class = class_create(THIS_MODULE, "ptp"); ptp_init()
357 pr_err("ptp: failed to allocate class\n"); ptp_init()
361 err = alloc_chrdev_region(&ptp_devt, 0, MINORMASK + 1, "ptp"); ptp_init()
363 pr_err("ptp: failed to allocate device region\n"); ptp_init()
H A Dptp_sysfs.c28 struct ptp_clock *ptp = dev_get_drvdata(dev); clock_name_show() local
29 return snprintf(page, PAGE_SIZE-1, "%s\n", ptp->info->name); clock_name_show()
37 struct ptp_clock *ptp = dev_get_drvdata(dev); \
38 return snprintf(page, PAGE_SIZE-1, "%d\n", ptp->info->var); \
74 struct ptp_clock *ptp = dev_get_drvdata(dev); extts_enable_store() local
75 struct ptp_clock_info *ops = ptp->info; extts_enable_store()
98 struct ptp_clock *ptp = dev_get_drvdata(dev); extts_fifo_show() local
99 struct timestamp_event_queue *queue = &ptp->tsevq; extts_fifo_show()
107 if (mutex_lock_interruptible(&ptp->tsevq_mux)) extts_fifo_show()
124 mutex_unlock(&ptp->tsevq_mux); extts_fifo_show()
132 struct ptp_clock *ptp = dev_get_drvdata(dev); period_store() local
133 struct ptp_clock_info *ops = ptp->info; period_store()
159 struct ptp_clock *ptp = dev_get_drvdata(dev); pps_enable_store() local
160 struct ptp_clock_info *ops = ptp->info; pps_enable_store()
181 static int ptp_pin_name2index(struct ptp_clock *ptp, const char *name) ptp_pin_name2index() argument
184 for (i = 0; i < ptp->info->n_pins; i++) { ptp_pin_name2index()
185 if (!strcmp(ptp->info->pin_config[i].name, name)) ptp_pin_name2index()
194 struct ptp_clock *ptp = dev_get_drvdata(dev); ptp_pin_show() local
198 index = ptp_pin_name2index(ptp, attr->attr.name); ptp_pin_show()
202 if (mutex_lock_interruptible(&ptp->pincfg_mux)) ptp_pin_show()
205 func = ptp->info->pin_config[index].func; ptp_pin_show()
206 chan = ptp->info->pin_config[index].chan; ptp_pin_show()
208 mutex_unlock(&ptp->pincfg_mux); ptp_pin_show()
216 struct ptp_clock *ptp = dev_get_drvdata(dev); ptp_pin_store() local
224 index = ptp_pin_name2index(ptp, attr->attr.name); ptp_pin_store()
228 if (mutex_lock_interruptible(&ptp->pincfg_mux)) ptp_pin_store()
230 err = ptp_set_pinfunc(ptp, index, func, chan); ptp_pin_store()
231 mutex_unlock(&ptp->pincfg_mux); ptp_pin_store()
243 int ptp_cleanup_sysfs(struct ptp_clock *ptp) ptp_cleanup_sysfs() argument
245 struct device *dev = ptp->dev; ptp_cleanup_sysfs()
246 struct ptp_clock_info *info = ptp->info; ptp_cleanup_sysfs()
259 sysfs_remove_group(&dev->kobj, &ptp->pin_attr_group); ptp_cleanup_sysfs()
260 kfree(ptp->pin_attr); ptp_cleanup_sysfs()
261 kfree(ptp->pin_dev_attr); ptp_cleanup_sysfs()
266 static int ptp_populate_pins(struct ptp_clock *ptp) ptp_populate_pins() argument
268 struct device *dev = ptp->dev; ptp_populate_pins()
269 struct ptp_clock_info *info = ptp->info; ptp_populate_pins()
272 ptp->pin_dev_attr = kzalloc(n_pins * sizeof(*ptp->pin_dev_attr), ptp_populate_pins()
274 if (!ptp->pin_dev_attr) ptp_populate_pins()
277 ptp->pin_attr = kzalloc((1 + n_pins) * sizeof(struct attribute *), ptp_populate_pins()
279 if (!ptp->pin_attr) ptp_populate_pins()
283 struct device_attribute *da = &ptp->pin_dev_attr[i]; ptp_populate_pins()
289 ptp->pin_attr[i] = &da->attr; ptp_populate_pins()
292 ptp->pin_attr_group.name = "pins"; ptp_populate_pins()
293 ptp->pin_attr_group.attrs = ptp->pin_attr; ptp_populate_pins()
295 err = sysfs_create_group(&dev->kobj, &ptp->pin_attr_group); ptp_populate_pins()
301 kfree(ptp->pin_attr); ptp_populate_pins()
303 kfree(ptp->pin_dev_attr); ptp_populate_pins()
308 int ptp_populate_sysfs(struct ptp_clock *ptp) ptp_populate_sysfs() argument
310 struct device *dev = ptp->dev; ptp_populate_sysfs()
311 struct ptp_clock_info *info = ptp->info; ptp_populate_sysfs()
333 err = ptp_populate_pins(ptp); ptp_populate_sysfs()
H A Dptp_chardev.c58 int ptp_set_pinfunc(struct ptp_clock *ptp, unsigned int pin, ptp_set_pinfunc() argument
61 struct ptp_clock_info *info = ptp->info; ptp_set_pinfunc()
124 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); ptp_ioctl() local
125 struct ptp_clock_info *ops = ptp->info; ptp_ioctl()
135 caps.max_adj = ptp->info->max_adj; ptp_ioctl()
136 caps.n_alarm = ptp->info->n_alarm; ptp_ioctl()
137 caps.n_ext_ts = ptp->info->n_ext_ts; ptp_ioctl()
138 caps.n_per_out = ptp->info->n_per_out; ptp_ioctl()
139 caps.pps = ptp->info->pps; ptp_ioctl()
140 caps.n_pins = ptp->info->n_pins; ptp_ioctl()
204 ptp->info->gettime64(ptp->info, &ts); ptp_ioctl()
226 if (mutex_lock_interruptible(&ptp->pincfg_mux)) ptp_ioctl()
229 mutex_unlock(&ptp->pincfg_mux); ptp_ioctl()
244 if (mutex_lock_interruptible(&ptp->pincfg_mux)) ptp_ioctl()
246 err = ptp_set_pinfunc(ptp, pin_index, pd.func, pd.chan); ptp_ioctl()
247 mutex_unlock(&ptp->pincfg_mux); ptp_ioctl()
261 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); ptp_poll() local
263 poll_wait(fp, &ptp->tsev_wq, wait); ptp_poll()
265 return queue_cnt(&ptp->tsevq) ? POLLIN : 0; ptp_poll()
273 struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock); ptp_read() local
274 struct timestamp_event_queue *queue = &ptp->tsevq; ptp_read()
288 if (mutex_lock_interruptible(&ptp->tsevq_mux)) ptp_read()
291 if (wait_event_interruptible(ptp->tsev_wq, ptp_read()
292 ptp->defunct || queue_cnt(queue))) { ptp_read()
293 mutex_unlock(&ptp->tsevq_mux); ptp_read()
297 if (ptp->defunct) { ptp_read()
298 mutex_unlock(&ptp->tsevq_mux); ptp_read()
304 mutex_unlock(&ptp->tsevq_mux); ptp_read()
324 mutex_unlock(&ptp->tsevq_mux); ptp_read()
H A Dptp_ixp46x.c136 static int ptp_ixp_adjfreq(struct ptp_clock_info *ptp, s32 ppb) ptp_ixp_adjfreq() argument
141 struct ixp_clock *ixp_clock = container_of(ptp, struct ixp_clock, caps); ptp_ixp_adjfreq()
160 static int ptp_ixp_adjtime(struct ptp_clock_info *ptp, s64 delta) ptp_ixp_adjtime() argument
164 struct ixp_clock *ixp_clock = container_of(ptp, struct ixp_clock, caps); ptp_ixp_adjtime()
178 static int ptp_ixp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) ptp_ixp_gettime() argument
183 struct ixp_clock *ixp_clock = container_of(ptp, struct ixp_clock, caps); ptp_ixp_gettime()
197 static int ptp_ixp_settime(struct ptp_clock_info *ptp, ptp_ixp_settime() argument
202 struct ixp_clock *ixp_clock = container_of(ptp, struct ixp_clock, caps); ptp_ixp_settime()
217 static int ptp_ixp_enable(struct ptp_clock_info *ptp, ptp_ixp_enable() argument
220 struct ixp_clock *ixp_clock = container_of(ptp, struct ixp_clock, caps); ptp_ixp_enable()
265 err = gpio_request(gpio, "ixp4-ptp"); setup_interrupt()
H A Dptp_private.h77 int ptp_set_pinfunc(struct ptp_clock *ptp, unsigned int pin,
97 int ptp_cleanup_sysfs(struct ptp_clock *ptp);
99 int ptp_populate_sysfs(struct ptp_clock *ptp);
H A Dptp_pch.c412 static int ptp_pch_adjfreq(struct ptp_clock_info *ptp, s32 ppb) ptp_pch_adjfreq() argument
417 struct pch_dev *pch_dev = container_of(ptp, struct pch_dev, caps); ptp_pch_adjfreq()
436 static int ptp_pch_adjtime(struct ptp_clock_info *ptp, s64 delta) ptp_pch_adjtime() argument
440 struct pch_dev *pch_dev = container_of(ptp, struct pch_dev, caps); ptp_pch_adjtime()
452 static int ptp_pch_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) ptp_pch_gettime() argument
457 struct pch_dev *pch_dev = container_of(ptp, struct pch_dev, caps); ptp_pch_gettime()
469 static int ptp_pch_settime(struct ptp_clock_info *ptp, ptp_pch_settime() argument
474 struct pch_dev *pch_dev = container_of(ptp, struct pch_dev, caps); ptp_pch_settime()
487 static int ptp_pch_enable(struct ptp_clock_info *ptp, ptp_pch_enable() argument
490 struct pch_dev *pch_dev = container_of(ptp, struct pch_dev, caps); ptp_pch_enable()
/linux-4.4.14/drivers/net/ethernet/renesas/
H A Dravb_ptp.c77 u32 gti_ns_plus_1 = (priv->ptp.current_addend >> 20) + 1; ravb_ptp_update_compare()
95 static int ravb_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb) ravb_ptp_adjfreq() argument
97 struct ravb_private *priv = container_of(ptp, struct ravb_private, ravb_ptp_adjfreq()
98 ptp.info); ravb_ptp_adjfreq()
109 addend = priv->ptp.default_addend; ravb_ptp_adjfreq()
116 priv->ptp.current_addend = addend; ravb_ptp_adjfreq()
131 static int ravb_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta) ravb_ptp_adjtime() argument
133 struct ravb_private *priv = container_of(ptp, struct ravb_private, ravb_ptp_adjtime()
134 ptp.info); ravb_ptp_adjtime()
152 static int ravb_ptp_gettime64(struct ptp_clock_info *ptp, struct timespec64 *ts) ravb_ptp_gettime64() argument
154 struct ravb_private *priv = container_of(ptp, struct ravb_private, ravb_ptp_gettime64()
155 ptp.info); ravb_ptp_gettime64()
166 static int ravb_ptp_settime64(struct ptp_clock_info *ptp, ravb_ptp_settime64() argument
169 struct ravb_private *priv = container_of(ptp, struct ravb_private, ravb_ptp_settime64()
170 ptp.info); ravb_ptp_settime64()
181 static int ravb_ptp_extts(struct ptp_clock_info *ptp, ravb_ptp_extts() argument
184 struct ravb_private *priv = container_of(ptp, struct ravb_private, ravb_ptp_extts()
185 ptp.info); ravb_ptp_extts()
193 if (priv->ptp.extts[req->index] == on) ravb_ptp_extts()
195 priv->ptp.extts[req->index] = on; ravb_ptp_extts()
210 static int ravb_ptp_perout(struct ptp_clock_info *ptp, ravb_ptp_perout() argument
213 struct ravb_private *priv = container_of(ptp, struct ravb_private, ravb_ptp_perout()
214 ptp.info); ravb_ptp_perout()
233 "ptp: start value (nsec) is over limit. Maximum size of start is only 32 bits\n"); ravb_ptp_perout()
239 "ptp: period value (nsec) is over limit. Maximum size of period is only 32 bits\n"); ravb_ptp_perout()
245 perout = &priv->ptp.perout[req->index]; ravb_ptp_perout()
258 perout = &priv->ptp.perout[req->index]; ravb_ptp_perout()
272 static int ravb_ptp_enable(struct ptp_clock_info *ptp, ravb_ptp_enable() argument
277 return ravb_ptp_extts(ptp, &req->extts, on); ravb_ptp_enable()
279 return ravb_ptp_perout(ptp, &req->perout, on); ravb_ptp_enable()
311 ptp_clock_event(priv->ptp.clock, &event); ravb_ptp_interrupt()
314 struct ravb_ptp_perout *perout = priv->ptp.perout; ravb_ptp_interrupt()
336 priv->ptp.info = ravb_ptp_info; ravb_ptp_init()
338 priv->ptp.default_addend = ravb_read(ndev, GTI); ravb_ptp_init()
339 priv->ptp.current_addend = priv->ptp.default_addend; ravb_ptp_init()
348 priv->ptp.clock = ptp_clock_register(&priv->ptp.info, &pdev->dev); ravb_ptp_init()
358 ptp_clock_unregister(priv->ptp.clock); ravb_ptp_stop()
H A Dravb.h798 struct ravb_ptp ptp; member in struct:ravb_private
H A Dravb_main.c1183 info->phc_index = ptp_clock_index(priv->ptp.clock); ravb_get_ts_info()
/linux-4.4.14/Documentation/
H A DMakefile3 networking pcmcia prctl ptp spi timers vDSO video4linux \
/linux-4.4.14/drivers/net/ethernet/stmicro/stmmac/
H A Dstmmac_ptp.c30 * @ptp: pointer to ptp_clock_info structure
35 static int stmmac_adjust_freq(struct ptp_clock_info *ptp, s32 ppb) stmmac_adjust_freq() argument
38 container_of(ptp, struct stmmac_priv, ptp_clock_ops); stmmac_adjust_freq()
57 priv->hw->ptp->config_addend(priv->ioaddr, addend); stmmac_adjust_freq()
67 * @ptp: pointer to ptp_clock_info structure
72 static int stmmac_adjust_time(struct ptp_clock_info *ptp, s64 delta) stmmac_adjust_time() argument
75 container_of(ptp, struct stmmac_priv, ptp_clock_ops); stmmac_adjust_time()
92 priv->hw->ptp->adjust_systime(priv->ioaddr, sec, nsec, neg_adj); stmmac_adjust_time()
102 * @ptp: pointer to ptp_clock_info structure
108 static int stmmac_get_time(struct ptp_clock_info *ptp, struct timespec64 *ts) stmmac_get_time() argument
111 container_of(ptp, struct stmmac_priv, ptp_clock_ops); stmmac_get_time()
117 ns = priv->hw->ptp->get_systime(priv->ioaddr); stmmac_get_time()
129 * @ptp: pointer to ptp_clock_info structure
135 static int stmmac_set_time(struct ptp_clock_info *ptp, stmmac_set_time() argument
139 container_of(ptp, struct stmmac_priv, ptp_clock_ops); stmmac_set_time()
144 priv->hw->ptp->init_systime(priv->ioaddr, ts->tv_sec, ts->tv_nsec); stmmac_set_time()
151 static int stmmac_enable(struct ptp_clock_info *ptp, stmmac_enable() argument
177 * Description: this function will register the ptp clock driver
200 * Description: this function will remove/unregister the ptp clock driver
H A Dstmmac_main.c595 priv->hw->ptp->config_hw_tstamping(priv->ioaddr, 0); stmmac_hwtstamp_ioctl()
602 priv->hw->ptp->config_hw_tstamping(priv->ioaddr, value); stmmac_hwtstamp_ioctl()
605 priv->hw->ptp->config_sub_second_increment(priv->ioaddr); stmmac_hwtstamp_ioctl()
620 priv->hw->ptp->config_addend(priv->ioaddr, stmmac_hwtstamp_ioctl()
627 priv->hw->ptp->init_systime(priv->ioaddr, (u32)now.tv_sec, stmmac_hwtstamp_ioctl()
640 * This function also registers the ptp driver.
667 priv->hw->ptp = &stmmac_ptp; stmmac_init_ptp()
H A Dcommon.h454 const struct stmmac_hwtimestamp *ptp; member in struct:mac_device_info
/linux-4.4.14/drivers/net/ethernet/sfc/
H A Dptp.c324 static int efx_phc_adjfreq(struct ptp_clock_info *ptp, s32 delta);
325 static int efx_phc_adjtime(struct ptp_clock_info *ptp, s64 delta);
326 static int efx_phc_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts);
327 static int efx_phc_settime(struct ptp_clock_info *ptp,
329 static int efx_phc_enable(struct ptp_clock_info *ptp,
479 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_get_attributes() local
506 ptp->ns_to_nic_time = efx_ptp_ns_to_s27; efx_ptp_get_attributes()
507 ptp->nic_to_kernel_time = efx_ptp_s27_to_ktime_correction; efx_ptp_get_attributes()
509 ptp->ns_to_nic_time = efx_ptp_ns_to_s_ns; efx_ptp_get_attributes()
510 ptp->nic_to_kernel_time = efx_ptp_s_ns_to_ktime_correction; efx_ptp_get_attributes()
515 ptp->time_format = fmt; efx_ptp_get_attributes()
524 ptp->min_synchronisation_ns = efx_ptp_get_attributes()
528 ptp->min_synchronisation_ns = DEFAULT_MIN_SYNCHRONISATION_NS; efx_ptp_get_attributes()
650 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_send_times() local
652 int *mc_running = ptp->start.addr; efx_ptp_send_times()
723 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_process_times() local
745 &ptp->timeset[i]); efx_ptp_process_times()
748 ptp->nic_to_kernel_time(0, ptp->timeset[i].wait, 0)); efx_ptp_process_times()
749 window = ptp->timeset[i].window; efx_ptp_process_times()
762 ++ptp->invalid_sync_windows; efx_ptp_process_times()
764 ++ptp->oversize_sync_windows; efx_ptp_process_times()
765 } else if (corrected < ptp->min_synchronisation_ns) { efx_ptp_process_times()
766 ++ptp->undersize_sync_windows; efx_ptp_process_times()
785 start_sec = ptp->timeset[last_good].host_start >> MC_NANOSECOND_BITS; efx_ptp_process_times()
796 (ptp->timeset[last_good].host_start & MC_NANOSECOND_MASK); efx_ptp_process_times()
802 mc_time = ptp->nic_to_kernel_time(ptp->timeset[last_good].major, efx_ptp_process_times()
803 ptp->timeset[last_good].minor, 0); efx_ptp_process_times()
809 ptp->host_time_pps = *last_time; efx_ptp_process_times()
810 pps_sub_ts(&ptp->host_time_pps, delta); efx_ptp_process_times()
818 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_synchronize() local
825 int *start = ptp->start.addr; efx_ptp_synchronize()
832 ptp->start.dma_addr); efx_ptp_synchronize()
848 ++ptp->fast_syncs; efx_ptp_synchronize()
850 ++ptp->sync_timeouts; efx_ptp_synchronize()
864 ++ptp->good_syncs; efx_ptp_synchronize()
866 ++ptp->no_time_syncs; efx_ptp_synchronize()
873 ++ptp->bad_syncs; efx_ptp_synchronize()
929 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_drop_time_expired_events() local
933 if (ptp->rx_ts_inline) efx_ptp_drop_time_expired_events()
937 spin_lock_bh(&ptp->evt_lock); efx_ptp_drop_time_expired_events()
938 if (!list_empty(&ptp->evt_list)) { efx_ptp_drop_time_expired_events()
939 list_for_each_safe(cursor, next, &ptp->evt_list) { efx_ptp_drop_time_expired_events()
945 list_move(&evt->link, &ptp->evt_free_list); efx_ptp_drop_time_expired_events()
951 spin_unlock_bh(&ptp->evt_lock); efx_ptp_drop_time_expired_events()
957 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_match_rx() local
964 WARN_ON_ONCE(ptp->rx_ts_inline); efx_ptp_match_rx()
966 spin_lock_bh(&ptp->evt_lock); efx_ptp_match_rx()
967 evts_waiting = !list_empty(&ptp->evt_list); efx_ptp_match_rx()
968 spin_unlock_bh(&ptp->evt_lock); efx_ptp_match_rx()
975 spin_lock_bh(&ptp->evt_lock); efx_ptp_match_rx()
976 list_for_each_safe(cursor, next, &ptp->evt_list) { efx_ptp_match_rx()
990 list_move(&evt->link, &ptp->evt_free_list); efx_ptp_match_rx()
994 spin_unlock_bh(&ptp->evt_lock); efx_ptp_match_rx()
1005 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_process_events() local
1008 while ((skb = skb_dequeue(&ptp->rxq))) { efx_ptp_process_events()
1019 ++ptp->rx_no_timestamp; efx_ptp_process_events()
1023 skb_queue_head(&ptp->rxq, skb); efx_ptp_process_events()
1039 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_remove_multicast_filters() local
1041 if (ptp->rxfilter_installed) { efx_ptp_remove_multicast_filters()
1043 ptp->rxfilter_general); efx_ptp_remove_multicast_filters()
1045 ptp->rxfilter_event); efx_ptp_remove_multicast_filters()
1046 ptp->rxfilter_installed = false; efx_ptp_remove_multicast_filters()
1052 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_insert_multicast_filters() local
1056 if (!ptp->channel || ptp->rxfilter_installed) efx_ptp_insert_multicast_filters()
1064 efx_channel_get_rx_queue(ptp->channel))); efx_ptp_insert_multicast_filters()
1074 ptp->rxfilter_event = rc; efx_ptp_insert_multicast_filters()
1078 efx_channel_get_rx_queue(ptp->channel))); efx_ptp_insert_multicast_filters()
1088 ptp->rxfilter_general = rc; efx_ptp_insert_multicast_filters()
1090 ptp->rxfilter_installed = true; efx_ptp_insert_multicast_filters()
1095 ptp->rxfilter_event); efx_ptp_insert_multicast_filters()
1101 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_start() local
1104 ptp->reset_required = false; efx_ptp_start()
1114 ptp->evt_frag_idx = 0; efx_ptp_start()
1115 ptp->current_adjfreq = 0; efx_ptp_start()
1126 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_stop() local
1131 if (ptp == NULL) efx_ptp_stop()
1161 struct efx_ptp_data *ptp = efx_ptp_pps_worker() local
1163 struct efx_nic *efx = ptp->efx; efx_ptp_pps_worker()
1170 ptp_evt.pps_times = ptp->host_time_pps; efx_ptp_pps_worker()
1171 ptp_clock_event(ptp->phc_clock, &ptp_evt); efx_ptp_pps_worker()
1219 struct efx_ptp_data *ptp; efx_ptp_probe() local
1223 ptp = kzalloc(sizeof(struct efx_ptp_data), GFP_KERNEL); efx_ptp_probe()
1224 efx->ptp_data = ptp; efx_ptp_probe()
1228 ptp->efx = efx; efx_ptp_probe()
1229 ptp->channel = channel; efx_ptp_probe()
1230 ptp->rx_ts_inline = efx_nic_rev(efx) >= EFX_REV_HUNT_A0; efx_ptp_probe()
1232 rc = efx_nic_alloc_buffer(efx, &ptp->start, sizeof(int), GFP_KERNEL); efx_ptp_probe()
1236 skb_queue_head_init(&ptp->rxq); efx_ptp_probe()
1237 skb_queue_head_init(&ptp->txq); efx_ptp_probe()
1238 ptp->workwq = create_singlethread_workqueue("sfc_ptp"); efx_ptp_probe()
1239 if (!ptp->workwq) { efx_ptp_probe()
1244 INIT_WORK(&ptp->work, efx_ptp_worker); efx_ptp_probe()
1245 ptp->config.flags = 0; efx_ptp_probe()
1246 ptp->config.tx_type = HWTSTAMP_TX_OFF; efx_ptp_probe()
1247 ptp->config.rx_filter = HWTSTAMP_FILTER_NONE; efx_ptp_probe()
1248 INIT_LIST_HEAD(&ptp->evt_list); efx_ptp_probe()
1249 INIT_LIST_HEAD(&ptp->evt_free_list); efx_ptp_probe()
1250 spin_lock_init(&ptp->evt_lock); efx_ptp_probe()
1252 list_add(&ptp->rx_evts[pos].link, &ptp->evt_free_list); efx_ptp_probe()
1266 ptp->phc_clock_info = efx_phc_clock_info; efx_ptp_probe()
1267 ptp->phc_clock = ptp_clock_register(&ptp->phc_clock_info, efx_ptp_probe()
1269 if (IS_ERR(ptp->phc_clock)) { efx_ptp_probe()
1270 rc = PTR_ERR(ptp->phc_clock); efx_ptp_probe()
1274 INIT_WORK(&ptp->pps_work, efx_ptp_pps_worker); efx_ptp_probe()
1275 ptp->pps_workwq = create_singlethread_workqueue("sfc_pps"); efx_ptp_probe()
1276 if (!ptp->pps_workwq) { efx_ptp_probe()
1281 ptp->nic_ts_enabled = false; efx_ptp_probe()
1291 efx_nic_free_buffer(efx, &ptp->start); efx_ptp_probe()
1303 * overlap with 'rxq0' because ptp.c doesn't use skb_record_rx_queue.
1347 snprintf(buf, len, "%s-ptp", channel->efx->name); efx_ptp_get_channel_name()
1375 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_rx() local
1384 if (ptp->mode == MC_CMD_PTP_MODE_V1) { efx_ptp_rx()
1417 if (ptp->mode == MC_CMD_PTP_MODE_V2) { efx_ptp_rx()
1421 BUG_ON(ptp->mode != MC_CMD_PTP_MODE_V2_ENHANCED); efx_ptp_rx()
1449 skb_queue_tail(&ptp->rxq, skb); efx_ptp_rx()
1450 queue_work(ptp->workwq, &ptp->work); efx_ptp_rx()
1461 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_tx() local
1463 skb_queue_tail(&ptp->txq, skb); efx_ptp_tx()
1468 queue_work(ptp->workwq, &ptp->work); efx_ptp_tx()
1542 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_get_ts_info() local
1547 if (!ptp) efx_ptp_get_ts_info()
1557 ts_info->rx_filters = ptp->efx->type->hwtstamp_filters; efx_ptp_get_ts_info()
1591 struct efx_ptp_data *ptp = efx->ptp_data; ptp_event_failure() local
1595 ptp->evt_frag_idx, expected_frag_len); ptp_event_failure()
1596 ptp->reset_required = true; ptp_event_failure()
1597 queue_work(ptp->workwq, &ptp->work); ptp_event_failure()
1604 static void ptp_event_rx(struct efx_nic *efx, struct efx_ptp_data *ptp) ptp_event_rx() argument
1608 if (WARN_ON_ONCE(ptp->rx_ts_inline)) ptp_event_rx()
1611 if (ptp->evt_frag_idx != 3) { ptp_event_rx()
1616 spin_lock_bh(&ptp->evt_lock); ptp_event_rx()
1617 if (!list_empty(&ptp->evt_free_list)) { ptp_event_rx()
1618 evt = list_first_entry(&ptp->evt_free_list, ptp_event_rx()
1622 evt->seq0 = EFX_QWORD_FIELD(ptp->evt_frags[2], MCDI_EVENT_DATA); ptp_event_rx()
1623 evt->seq1 = (EFX_QWORD_FIELD(ptp->evt_frags[2], ptp_event_rx()
1625 (EFX_QWORD_FIELD(ptp->evt_frags[1], ptp_event_rx()
1627 (EFX_QWORD_FIELD(ptp->evt_frags[0], ptp_event_rx()
1630 EFX_QWORD_FIELD(ptp->evt_frags[0], MCDI_EVENT_DATA), ptp_event_rx()
1631 EFX_QWORD_FIELD(ptp->evt_frags[1], MCDI_EVENT_DATA), ptp_event_rx()
1632 ptp->ts_corrections.rx); ptp_event_rx()
1634 list_add_tail(&evt->link, &ptp->evt_list); ptp_event_rx()
1636 queue_work(ptp->workwq, &ptp->work); ptp_event_rx()
1641 spin_unlock_bh(&ptp->evt_lock); ptp_event_rx()
1644 static void ptp_event_fault(struct efx_nic *efx, struct efx_ptp_data *ptp) ptp_event_fault() argument
1646 int code = EFX_QWORD_FIELD(ptp->evt_frags[0], MCDI_EVENT_DATA); ptp_event_fault()
1647 if (ptp->evt_frag_idx != 1) { ptp_event_fault()
1655 static void ptp_event_pps(struct efx_nic *efx, struct efx_ptp_data *ptp) ptp_event_pps() argument
1657 if (ptp->nic_ts_enabled) ptp_event_pps()
1658 queue_work(ptp->pps_workwq, &ptp->pps_work); ptp_event_pps()
1663 struct efx_ptp_data *ptp = efx->ptp_data; efx_ptp_event() local
1666 if (!ptp) { efx_ptp_event()
1673 if (!ptp->enabled) efx_ptp_event()
1676 if (ptp->evt_frag_idx == 0) { efx_ptp_event()
1677 ptp->evt_code = code; efx_ptp_event()
1678 } else if (ptp->evt_code != code) { efx_ptp_event()
1681 ptp->evt_frag_idx = 0; efx_ptp_event()
1684 ptp->evt_frags[ptp->evt_frag_idx++] = *ev; efx_ptp_event()
1689 ptp_event_rx(efx, ptp); efx_ptp_event()
1692 ptp_event_fault(efx, ptp); efx_ptp_event()
1695 ptp_event_pps(efx, ptp); efx_ptp_event()
1702 ptp->evt_frag_idx = 0; efx_ptp_event()
1703 } else if (MAX_EVENT_FRAGS == ptp->evt_frag_idx) { efx_ptp_event()
1706 ptp->evt_frag_idx = 0; efx_ptp_event()
1797 static int efx_phc_adjfreq(struct ptp_clock_info *ptp, s32 delta) efx_phc_adjfreq() argument
1799 struct efx_ptp_data *ptp_data = container_of(ptp, efx_phc_adjfreq()
1830 static int efx_phc_adjtime(struct ptp_clock_info *ptp, s64 delta) efx_phc_adjtime() argument
1833 struct efx_ptp_data *ptp_data = container_of(ptp, efx_phc_adjtime()
1850 static int efx_phc_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) efx_phc_gettime() argument
1852 struct efx_ptp_data *ptp_data = container_of(ptp, efx_phc_gettime()
1876 static int efx_phc_settime(struct ptp_clock_info *ptp, efx_phc_settime() argument
1887 rc = efx_phc_gettime(ptp, &time_now); efx_phc_settime()
1893 rc = efx_phc_adjtime(ptp, timespec64_to_ns(&delta)); efx_phc_settime()
1900 static int efx_phc_enable(struct ptp_clock_info *ptp, efx_phc_enable() argument
1904 struct efx_ptp_data *ptp_data = container_of(ptp, efx_phc_enable()
H A Dnet_driver.h422 * @sync_timestamp_major: Major part of the last ptp sync event
423 * @sync_timestamp_minor: Minor part of the last ptp sync event
/linux-4.4.14/drivers/net/ethernet/amd/xgbe/
H A DMakefile5 xgbe-ptp.o
H A Dxgbe-main.c262 dev_err(dev, "ptp devm_clk_get failed\n"); xgbe_of_support()
H A Dxgbe.h199 #define XGBE_ACPI_PTP_FREQ "amd,ptp-freq"
H A Dxgbe-drv.c1314 netdev_alert(netdev, "ptp clk_prepare_enable failed\n"); xgbe_open()
/linux-4.4.14/drivers/net/ethernet/intel/e1000e/
H A Dptp.c31 * @ptp: ptp clock structure
37 static int e1000e_phc_adjfreq(struct ptp_clock_info *ptp, s32 delta) e1000e_phc_adjfreq() argument
39 struct e1000_adapter *adapter = container_of(ptp, struct e1000_adapter, e1000e_phc_adjfreq()
48 if ((delta > ptp->max_adj) || (delta <= -1000000000)) e1000e_phc_adjfreq()
83 * @ptp: ptp clock structure
88 static int e1000e_phc_adjtime(struct ptp_clock_info *ptp, s64 delta) e1000e_phc_adjtime() argument
90 struct e1000_adapter *adapter = container_of(ptp, struct e1000_adapter, e1000e_phc_adjtime()
103 * @ptp: ptp clock structure
109 static int e1000e_phc_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) e1000e_phc_gettime() argument
111 struct e1000_adapter *adapter = container_of(ptp, struct e1000_adapter, e1000e_phc_gettime()
127 * @ptp: ptp clock structure
133 static int e1000e_phc_settime(struct ptp_clock_info *ptp, e1000e_phc_settime() argument
136 struct e1000_adapter *adapter = container_of(ptp, struct e1000_adapter, e1000e_phc_settime()
153 * @ptp: ptp clock structure
160 static int e1000e_phc_enable(struct ptp_clock_info __always_unused *ptp, e1000e_phc_enable() argument
H A DMakefile36 param.o ethtool.o netdev.o ptp.o
/linux-4.4.14/drivers/net/ethernet/mellanox/mlx4/
H A Den_clock.c107 * @ptp: ptp clock structure
113 static int mlx4_en_phc_adjfreq(struct ptp_clock_info *ptp, s32 delta) mlx4_en_phc_adjfreq() argument
119 struct mlx4_en_dev *mdev = container_of(ptp, struct mlx4_en_dev, mlx4_en_phc_adjfreq()
141 * @ptp: ptp clock structure
146 static int mlx4_en_phc_adjtime(struct ptp_clock_info *ptp, s64 delta) mlx4_en_phc_adjtime() argument
148 struct mlx4_en_dev *mdev = container_of(ptp, struct mlx4_en_dev, mlx4_en_phc_adjtime()
161 * @ptp: ptp clock structure
167 static int mlx4_en_phc_gettime(struct ptp_clock_info *ptp, mlx4_en_phc_gettime() argument
170 struct mlx4_en_dev *mdev = container_of(ptp, struct mlx4_en_dev, mlx4_en_phc_gettime()
186 * @ptp: ptp clock structure
192 static int mlx4_en_phc_settime(struct ptp_clock_info *ptp, mlx4_en_phc_settime() argument
195 struct mlx4_en_dev *mdev = container_of(ptp, struct mlx4_en_dev, mlx4_en_phc_settime()
210 * @ptp: ptp clock structure
217 static int mlx4_en_phc_enable(struct ptp_clock_info __always_unused *ptp, mlx4_en_phc_enable() argument
294 snprintf(mdev->ptp_clock_info.name, 16, "mlx4 ptp"); mlx4_en_init_timestamp()
/linux-4.4.14/include/linux/
H A Dptp_clock_kernel.h105 int (*adjfreq)(struct ptp_clock_info *ptp, s32 delta);
106 int (*adjtime)(struct ptp_clock_info *ptp, s64 delta);
107 int (*gettime64)(struct ptp_clock_info *ptp, struct timespec64 *ts);
109 int (*enable)(struct ptp_clock_info *ptp,
111 int (*verify)(struct ptp_clock_info *ptp, unsigned int pin,
130 * @ptp: The clock to remove from service.
133 extern int ptp_clock_unregister(struct ptp_clock *ptp);
164 * @ptp: The clock obtained from ptp_clock_register().
168 extern void ptp_clock_event(struct ptp_clock *ptp,
174 * @ptp: The clock obtained from ptp_clock_register().
177 extern int ptp_clock_index(struct ptp_clock *ptp);
182 * @ptp: The clock obtained from ptp_clock_register().
189 int ptp_find_pin(struct ptp_clock *ptp,
/linux-4.4.14/drivers/net/ethernet/freescale/
H A Dfec_ptp.c120 dev_err(&fep->pdev->dev, "No ptp stack is running\n"); fec_ptp_enable_pps()
152 * second point. So we need to know what the ptp time fec_ptp_enable_pps()
163 /* Convert the ptp local counter to 1588 timestamp */ fec_ptp_enable_pps()
186 * ptp counter, which maybe cause 32-bit wrap. Since the fec_ptp_enable_pps()
267 /* grab the ptp lock */ fec_ptp_start_cyclecounter()
292 * fec_ptp_adjfreq - adjust ptp cycle frequency
293 * @ptp: the ptp clock structure
296 * Adjust the frequency of the ptp cycle counter by the
302 static int fec_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb) fec_ptp_adjfreq() argument
312 container_of(ptp, struct fec_enet_private, ptp_caps); fec_ptp_adjfreq()
366 * @ptp: the ptp clock structure
371 static int fec_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta) fec_ptp_adjtime() argument
374 container_of(ptp, struct fec_enet_private, ptp_caps); fec_ptp_adjtime()
386 * @ptp: the ptp clock structure
392 static int fec_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) fec_ptp_gettime() argument
395 container_of(ptp, struct fec_enet_private, ptp_caps); fec_ptp_gettime()
410 * @ptp: the ptp clock structure
416 static int fec_ptp_settime(struct ptp_clock_info *ptp, fec_ptp_settime() argument
420 container_of(ptp, struct fec_enet_private, ptp_caps); fec_ptp_settime()
427 /* Check the ptp clock */ fec_ptp_settime()
449 * @ptp: the ptp clock structure
454 static int fec_ptp_enable(struct ptp_clock_info *ptp, fec_ptp_enable() argument
458 container_of(ptp, struct fec_enet_private, ptp_caps); fec_ptp_enable()
556 * This function performs the required steps for enabling ptp
557 * support. If ptp support has already been loaded it simply calls the
567 snprintf(fep->ptp_caps.name, 16, "fec ptp"); fec_ptp_init()
H A Dgianfar_ptp.c38 * gianfar ptp registers
283 static int ptp_gianfar_adjfreq(struct ptp_clock_info *ptp, s32 ppb) ptp_gianfar_adjfreq() argument
288 struct etsects *etsects = container_of(ptp, struct etsects, caps); ptp_gianfar_adjfreq()
306 static int ptp_gianfar_adjtime(struct ptp_clock_info *ptp, s64 delta) ptp_gianfar_adjtime() argument
310 struct etsects *etsects = container_of(ptp, struct etsects, caps); ptp_gianfar_adjtime()
325 static int ptp_gianfar_gettime(struct ptp_clock_info *ptp, ptp_gianfar_gettime() argument
330 struct etsects *etsects = container_of(ptp, struct etsects, caps); ptp_gianfar_gettime()
343 static int ptp_gianfar_settime(struct ptp_clock_info *ptp, ptp_gianfar_settime() argument
348 struct etsects *etsects = container_of(ptp, struct etsects, caps); ptp_gianfar_settime()
362 static int ptp_gianfar_enable(struct ptp_clock_info *ptp, ptp_gianfar_enable() argument
365 struct etsects *etsects = container_of(ptp, struct etsects, caps); ptp_gianfar_enable()
494 pr_err("ioremap ptp registers failed\n"); gianfar_ptp_probe()
557 { .compatible = "fsl,etsec-ptp" },
H A Dfec.h554 /* ptp clock period in ns*/
H A Dgianfar.h562 u8 ptp; /* Flag to enable tx timestamping */ member in struct:txfcb
H A Dfec_main.c3429 fep->clk_ptp = devm_clk_get(&pdev->dev, "ptp"); fec_probe()
H A Dgianfar.c2478 fcb->ptp = 1; gfar_start_xmit()
/linux-4.4.14/arch/parisc/kernel/
H A Dentry.S457 .macro tlb_lock spc,ptp,pte,tmp,tmp1,fault
464 LDREG 0(\ptp),\pte
490 .macro update_accessed ptp,pte,tmp,tmp1
494 STREG \tmp,0(\ptp)
499 .macro update_dirty ptp,pte,tmp
502 STREG \pte,0(\ptp)
1148 ptp = r25 /* page directory/page table pointer */ define
1154 get_pgd spc,ptp
1157 L3_ptep ptp,pte,t0,va,dtlb_check_alias_20w
1159 tlb_lock spc,ptp,pte,t0,t1,dtlb_check_alias_20w
1160 update_accessed ptp,pte,t0,t1
1180 get_pgd spc,ptp
1183 L3_ptep ptp,pte,t0,va,nadtlb_check_alias_20w
1185 tlb_lock spc,ptp,pte,t0,t1,nadtlb_check_alias_20w
1186 update_accessed ptp,pte,t0,t1
1207 get_pgd spc,ptp
1211 L2_ptep ptp,pte,t0,va,dtlb_check_alias_11
1213 tlb_lock spc,ptp,pte,t0,t1,dtlb_check_alias_11
1214 update_accessed ptp,pte,t0,t1
1240 get_pgd spc,ptp
1244 L2_ptep ptp,pte,t0,va,nadtlb_check_alias_11
1246 tlb_lock spc,ptp,pte,t0,t1,nadtlb_check_alias_11
1247 update_accessed ptp,pte,t0,t1
1274 get_pgd spc,ptp
1277 L2_ptep ptp,pte,t0,va,dtlb_check_alias_20
1279 tlb_lock spc,ptp,pte,t0,t1,dtlb_check_alias_20
1280 update_accessed ptp,pte,t0,t1
1301 get_pgd spc,ptp
1305 L2_ptep ptp,pte,t0,va,nadtlb_check_alias_20
1307 tlb_lock spc,ptp,pte,t0,t1,nadtlb_check_alias_20
1308 update_accessed ptp,pte,t0,t1
1411 get_pgd spc,ptp
1414 L3_ptep ptp,pte,t0,va,itlb_fault
1416 tlb_lock spc,ptp,pte,t0,t1,itlb_fault
1417 update_accessed ptp,pte,t0,t1
1435 get_pgd spc,ptp
1438 L3_ptep ptp,pte,t0,va,naitlb_check_alias_20w
1440 tlb_lock spc,ptp,pte,t0,t1,naitlb_check_alias_20w
1441 update_accessed ptp,pte,t0,t1
1462 get_pgd spc,ptp
1466 L2_ptep ptp,pte,t0,va,itlb_fault
1468 tlb_lock spc,ptp,pte,t0,t1,itlb_fault
1469 update_accessed ptp,pte,t0,t1
1486 get_pgd spc,ptp
1490 L2_ptep ptp,pte,t0,va,naitlb_check_alias_11
1492 tlb_lock spc,ptp,pte,t0,t1,naitlb_check_alias_11
1493 update_accessed ptp,pte,t0,t1
1520 get_pgd spc,ptp
1524 L2_ptep ptp,pte,t0,va,itlb_fault
1526 tlb_lock spc,ptp,pte,t0,t1,itlb_fault
1527 update_accessed ptp,pte,t0,t1
1540 get_pgd spc,ptp
1544 L2_ptep ptp,pte,t0,va,naitlb_check_alias_20
1546 tlb_lock spc,ptp,pte,t0,t1,naitlb_check_alias_20
1547 update_accessed ptp,pte,t0,t1
1573 get_pgd spc,ptp
1576 L3_ptep ptp,pte,t0,va,dbit_fault
1578 tlb_lock spc,ptp,pte,t0,t1,dbit_fault
1579 update_dirty ptp,pte,t1
1592 get_pgd spc,ptp
1596 L2_ptep ptp,pte,t0,va,dbit_fault
1598 tlb_lock spc,ptp,pte,t0,t1,dbit_fault
1599 update_dirty ptp,pte,t1
1616 get_pgd spc,ptp
1620 L2_ptep ptp,pte,t0,va,dbit_fault
1622 tlb_lock spc,ptp,pte,t0,t1,dbit_fault
1623 update_dirty ptp,pte,t1
/linux-4.4.14/drivers/net/ethernet/intel/fm10k/
H A Dfm10k_ptp.c260 static int fm10k_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb) fm10k_ptp_adjfreq() argument
266 interface = container_of(ptp, struct fm10k_intfc, ptp_caps); fm10k_ptp_adjfreq()
275 static int fm10k_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta) fm10k_ptp_adjtime() argument
280 interface = container_of(ptp, struct fm10k_intfc, ptp_caps); fm10k_ptp_adjtime()
289 static int fm10k_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) fm10k_ptp_gettime() argument
295 interface = container_of(ptp, struct fm10k_intfc, ptp_caps); fm10k_ptp_gettime()
306 static int fm10k_ptp_settime(struct ptp_clock_info *ptp, fm10k_ptp_settime() argument
313 interface = container_of(ptp, struct fm10k_intfc, ptp_caps); fm10k_ptp_settime()
322 static int fm10k_ptp_enable(struct ptp_clock_info *ptp, fm10k_ptp_enable() argument
337 if (rq->perout.index >= ptp->n_per_out) fm10k_ptp_enable()
349 interface = container_of(ptp, struct fm10k_intfc, ptp_caps); fm10k_ptp_enable()
389 static int fm10k_ptp_verify(struct ptp_clock_info *ptp, unsigned int pin, fm10k_ptp_verify() argument
393 if (pin >= ptp->n_pins || !ptp->pin_config) fm10k_ptp_verify()
397 if (chan != ptp->pin_config[pin].chan) fm10k_ptp_verify()
401 if (func != ptp->pin_config[pin].func) fm10k_ptp_verify()
/linux-4.4.14/sound/pci/ctxfi/
H A Dctvmem.c132 unsigned long *ptp; ct_vm_map() local
142 ptp = (unsigned long *)vm->ptp[0].area; ct_vm_map()
148 ptp[pte_start + i] = addr; ct_vm_map()
171 addr = (index >= CT_PTP_NUM) ? ~0UL : vm->ptp[index].addr; ct_get_ptp_phys()
194 PAGE_SIZE, &vm->ptp[i]); ct_vm_create()
244 snd_dma_free_pages(&vm->ptp[i]); ct_vm_destroy()
H A Dctvmem.h46 struct snd_dma_buffer ptp[CT_PTP_NUM]; /* Device page table pages */ member in struct:ct_vm
/linux-4.4.14/drivers/net/ethernet/ti/
H A Dcpts.c130 static int cpts_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb) cpts_ptp_adjfreq() argument
136 struct cpts *cpts = container_of(ptp, struct cpts, info); cpts_ptp_adjfreq()
158 static int cpts_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta) cpts_ptp_adjtime() argument
161 struct cpts *cpts = container_of(ptp, struct cpts, info); cpts_ptp_adjtime()
170 static int cpts_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) cpts_ptp_gettime() argument
174 struct cpts *cpts = container_of(ptp, struct cpts, info); cpts_ptp_gettime()
185 static int cpts_ptp_settime(struct ptp_clock_info *ptp, cpts_ptp_settime() argument
190 struct cpts *cpts = container_of(ptp, struct cpts, info); cpts_ptp_settime()
201 static int cpts_ptp_enable(struct ptp_clock_info *ptp, cpts_ptp_enable() argument
/linux-4.4.14/drivers/pinctrl/mvebu/
H A Dpinctrl-armada-38x.c111 MPP_VAR_FUNCTION(2, "ptp", "clk", V_88F6810_PLUS),
133 MPP_VAR_FUNCTION(2, "ptp", "clk", V_88F6810_PLUS),
141 MPP_VAR_FUNCTION(2, "ptp", "trig", V_88F6810_PLUS),
147 MPP_VAR_FUNCTION(2, "ptp", "evreq", V_88F6810_PLUS),
155 MPP_VAR_FUNCTION(2, "ptp", "clk", V_88F6810_PLUS),
236 MPP_VAR_FUNCTION(1, "ptp", "trig", V_88F6810_PLUS),
240 MPP_VAR_FUNCTION(1, "ptp", "clk", V_88F6810_PLUS),
246 MPP_VAR_FUNCTION(1, "ptp", "evreq", V_88F6810_PLUS),
335 MPP_VAR_FUNCTION(6, "ptp", "trig", V_88F6810_PLUS)),
342 MPP_VAR_FUNCTION(6, "ptp", "clk", V_88F6810_PLUS)),
350 MPP_VAR_FUNCTION(6, "ptp", "evreq", V_88F6810_PLUS)),
H A Dpinctrl-kirkwood.c72 MPP_VAR_FUNCTION(0xd, "ptp", "clk", V(1, 1, 1, 1, 0, 0))),
77 MPP_VAR_FUNCTION(0x4, "ptp", "trig", V(1, 1, 1, 1, 0, 0)),
83 MPP_VAR_FUNCTION(0x3, "ptp", "trig", V(1, 1, 1, 1, 0, 0))),
88 MPP_VAR_FUNCTION(0x3, "ptp", "trig", V(1, 1, 1, 1, 0, 0)),
97 MPP_VAR_FUNCTION(0xc, "ptp", "clk", V(1, 1, 1, 1, 0, 0)),
105 MPP_VAR_FUNCTION(0xc, "ptp", "evreq", V(1, 1, 1, 1, 0, 0)),
112 MPP_VAR_FUNCTION(0xc, "ptp", "trig", V(1, 1, 1, 1, 0, 0))),
117 MPP_VAR_FUNCTION(0x4, "ptp-1", "evreq", V(1, 1, 1, 1, 0, 0)),
118 MPP_VAR_FUNCTION(0xc, "ptp-2", "trig", V(1, 1, 1, 1, 0, 0)),
119 MPP_VAR_FUNCTION(0xd, "ptp", "clk", V(1, 1, 1, 1, 0, 0)),
368 MPP_VAR_FUNCTION(0x5, "ptp", "clk", V(0, 0, 0, 1, 0, 0)),
H A Dpinctrl-armada-375.c54 MPP_FUNCTION(0x2, "ptp", "evreq"),
62 MPP_FUNCTION(0x2, "ptp", "trig"),
89 MPP_FUNCTION(0x2, "ptp", "clk"),
210 MPP_FUNCTION(0x6, "ptp", "evreq")),
220 MPP_FUNCTION(0x4, "ptp", "trig"),
267 MPP_FUNCTION(0x6, "ptp", "clk")),
293 MPP_FUNCTION(0x5, "ptp", "trig"),
312 MPP_FUNCTION(0x5, "ptp", "evreq"),
380 MPP_FUNCTION(0x2, "ptp", "trig"),
392 MPP_FUNCTION(0x2, "ptp", "evreq"),
H A Dpinctrl-armada-xp.c141 MPP_VAR_FUNCTION(0x3, "ptp", "trig", V_MV78230_PLUS),
147 MPP_VAR_FUNCTION(0x3, "ptp", "evreq", V_MV78230_PLUS),
153 MPP_VAR_FUNCTION(0x3, "ptp", "clk", V_MV78230_PLUS),
189 MPP_VAR_FUNCTION(0x1, "ptp", "trig", V_MV78230_PLUS),
194 MPP_VAR_FUNCTION(0x1, "ptp", "evreq", V_MV78230_PLUS),
199 MPP_VAR_FUNCTION(0x1, "ptp", "clk", V_MV78230_PLUS),
H A Dpinctrl-armada-39x.c79 MPP_VAR_FUNCTION(7, "ptp", "trig", V_88F6920_PLUS)),
83 MPP_VAR_FUNCTION(7, "ptp", "clk", V_88F6920_PLUS)),
87 MPP_VAR_FUNCTION(7, "ptp", "evreq", V_88F6920_PLUS)),
/linux-4.4.14/arch/mips/include/asm/octeon/
H A Dcvmx-ciu-defs.h281 uint64_t ptp:1; member in struct:cvmx_ciu_block_int::cvmx_ciu_block_int_s
355 uint64_t ptp:1;
365 uint64_t ptp:1; member in struct:cvmx_ciu_block_int::cvmx_ciu_block_int_cn61xx
431 uint64_t ptp:1;
438 uint64_t ptp:1; member in struct:cvmx_ciu_block_int::cvmx_ciu_block_int_cn63xx
510 uint64_t ptp:1;
521 uint64_t ptp:1; member in struct:cvmx_ciu_block_int::cvmx_ciu_block_int_cn66xx
593 uint64_t ptp:1;
603 uint64_t ptp:1; member in struct:cvmx_ciu_block_int::cvmx_ciu_block_int_cnf71xx
659 uint64_t ptp:1;
2391 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en1::cvmx_ciu_intx_en1_s
2447 uint64_t ptp:1;
2547 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en1::cvmx_ciu_intx_en1_cn61xx
2601 uint64_t ptp:1;
2621 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en1::cvmx_ciu_intx_en1_cn63xx
2669 uint64_t ptp:1;
2696 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en1::cvmx_ciu_intx_en1_cn66xx
2746 uint64_t ptp:1;
2769 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en1::cvmx_ciu_intx_en1_cnf71xx
2817 uint64_t ptp:1;
2844 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en1_w1c::cvmx_ciu_intx_en1_w1c_s
2900 uint64_t ptp:1;
2960 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en1_w1c::cvmx_ciu_intx_en1_w1c_cn61xx
3014 uint64_t ptp:1;
3034 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en1_w1c::cvmx_ciu_intx_en1_w1c_cn63xx
3082 uint64_t ptp:1;
3109 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en1_w1c::cvmx_ciu_intx_en1_w1c_cn66xx
3159 uint64_t ptp:1;
3182 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en1_w1c::cvmx_ciu_intx_en1_w1c_cnf71xx
3230 uint64_t ptp:1;
3257 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en1_w1s::cvmx_ciu_intx_en1_w1s_s
3313 uint64_t ptp:1;
3373 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en1_w1s::cvmx_ciu_intx_en1_w1s_cn61xx
3427 uint64_t ptp:1;
3447 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en1_w1s::cvmx_ciu_intx_en1_w1s_cn63xx
3495 uint64_t ptp:1;
3522 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en1_w1s::cvmx_ciu_intx_en1_w1s_cn66xx
3572 uint64_t ptp:1;
3595 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en1_w1s::cvmx_ciu_intx_en1_w1s_cnf71xx
3643 uint64_t ptp:1;
4721 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en4_1::cvmx_ciu_intx_en4_1_s
4777 uint64_t ptp:1;
4865 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en4_1::cvmx_ciu_intx_en4_1_cn61xx
4919 uint64_t ptp:1;
4939 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en4_1::cvmx_ciu_intx_en4_1_cn63xx
4987 uint64_t ptp:1;
5014 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en4_1::cvmx_ciu_intx_en4_1_cn66xx
5064 uint64_t ptp:1;
5087 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en4_1::cvmx_ciu_intx_en4_1_cnf71xx
5135 uint64_t ptp:1;
5162 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en4_1_w1c::cvmx_ciu_intx_en4_1_w1c_s
5218 uint64_t ptp:1;
5278 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en4_1_w1c::cvmx_ciu_intx_en4_1_w1c_cn61xx
5332 uint64_t ptp:1;
5352 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en4_1_w1c::cvmx_ciu_intx_en4_1_w1c_cn63xx
5400 uint64_t ptp:1;
5427 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en4_1_w1c::cvmx_ciu_intx_en4_1_w1c_cn66xx
5477 uint64_t ptp:1;
5500 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en4_1_w1c::cvmx_ciu_intx_en4_1_w1c_cnf71xx
5548 uint64_t ptp:1;
5575 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en4_1_w1s::cvmx_ciu_intx_en4_1_w1s_s
5631 uint64_t ptp:1;
5691 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en4_1_w1s::cvmx_ciu_intx_en4_1_w1s_cn61xx
5745 uint64_t ptp:1;
5765 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en4_1_w1s::cvmx_ciu_intx_en4_1_w1s_cn63xx
5813 uint64_t ptp:1;
5840 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en4_1_w1s::cvmx_ciu_intx_en4_1_w1s_cn66xx
5890 uint64_t ptp:1;
5913 uint64_t ptp:1; member in struct:cvmx_ciu_intx_en4_1_w1s::cvmx_ciu_intx_en4_1_w1s_cnf71xx
5961 uint64_t ptp:1;
7059 uint64_t ptp:1; member in struct:cvmx_ciu_int_sum1::cvmx_ciu_int_sum1_s
7111 uint64_t ptp:1;
7211 uint64_t ptp:1; member in struct:cvmx_ciu_int_sum1::cvmx_ciu_int_sum1_cn61xx
7261 uint64_t ptp:1;
7281 uint64_t ptp:1; member in struct:cvmx_ciu_int_sum1::cvmx_ciu_int_sum1_cn63xx
7329 uint64_t ptp:1;
7356 uint64_t ptp:1; member in struct:cvmx_ciu_int_sum1::cvmx_ciu_int_sum1_cn66xx
7406 uint64_t ptp:1;
7429 uint64_t ptp:1; member in struct:cvmx_ciu_int_sum1::cvmx_ciu_int_sum1_cnf71xx
7473 uint64_t ptp:1;
8586 uint64_t ptp:1; member in struct:cvmx_ciu_sum1_iox_int::cvmx_ciu_sum1_iox_int_s
8640 uint64_t ptp:1;
8663 uint64_t ptp:1; member in struct:cvmx_ciu_sum1_iox_int::cvmx_ciu_sum1_iox_int_cn61xx
8717 uint64_t ptp:1;
8740 uint64_t ptp:1; member in struct:cvmx_ciu_sum1_iox_int::cvmx_ciu_sum1_iox_int_cn66xx
8790 uint64_t ptp:1;
8813 uint64_t ptp:1; member in struct:cvmx_ciu_sum1_iox_int::cvmx_ciu_sum1_iox_int_cnf71xx
8861 uint64_t ptp:1;
8888 uint64_t ptp:1; member in struct:cvmx_ciu_sum1_ppx_ip2::cvmx_ciu_sum1_ppx_ip2_s
8942 uint64_t ptp:1;
8965 uint64_t ptp:1; member in struct:cvmx_ciu_sum1_ppx_ip2::cvmx_ciu_sum1_ppx_ip2_cn61xx
9019 uint64_t ptp:1;
9042 uint64_t ptp:1; member in struct:cvmx_ciu_sum1_ppx_ip2::cvmx_ciu_sum1_ppx_ip2_cn66xx
9092 uint64_t ptp:1;
9115 uint64_t ptp:1; member in struct:cvmx_ciu_sum1_ppx_ip2::cvmx_ciu_sum1_ppx_ip2_cnf71xx
9163 uint64_t ptp:1;
9190 uint64_t ptp:1; member in struct:cvmx_ciu_sum1_ppx_ip3::cvmx_ciu_sum1_ppx_ip3_s
9244 uint64_t ptp:1;
9267 uint64_t ptp:1; member in struct:cvmx_ciu_sum1_ppx_ip3::cvmx_ciu_sum1_ppx_ip3_cn61xx
9321 uint64_t ptp:1;
9344 uint64_t ptp:1; member in struct:cvmx_ciu_sum1_ppx_ip3::cvmx_ciu_sum1_ppx_ip3_cn66xx
9394 uint64_t ptp:1;
9417 uint64_t ptp:1; member in struct:cvmx_ciu_sum1_ppx_ip3::cvmx_ciu_sum1_ppx_ip3_cnf71xx
9465 uint64_t ptp:1;
9492 uint64_t ptp:1; member in struct:cvmx_ciu_sum1_ppx_ip4::cvmx_ciu_sum1_ppx_ip4_s
9546 uint64_t ptp:1;
9569 uint64_t ptp:1; member in struct:cvmx_ciu_sum1_ppx_ip4::cvmx_ciu_sum1_ppx_ip4_cn61xx
9623 uint64_t ptp:1;
9646 uint64_t ptp:1; member in struct:cvmx_ciu_sum1_ppx_ip4::cvmx_ciu_sum1_ppx_ip4_cn66xx
9696 uint64_t ptp:1;
9719 uint64_t ptp:1; member in struct:cvmx_ciu_sum1_ppx_ip4::cvmx_ciu_sum1_ppx_ip4_cnf71xx
9767 uint64_t ptp:1;
H A Dcvmx-ciu2-defs.h513 uint64_t ptp:1; member in struct:cvmx_ciu2_en_iox_int_mio::cvmx_ciu2_en_iox_int_mio_s
551 uint64_t ptp:1;
566 uint64_t ptp:1; member in struct:cvmx_ciu2_en_iox_int_mio_w1c::cvmx_ciu2_en_iox_int_mio_w1c_s
604 uint64_t ptp:1;
619 uint64_t ptp:1; member in struct:cvmx_ciu2_en_iox_int_mio_w1s::cvmx_ciu2_en_iox_int_mio_w1s_s
657 uint64_t ptp:1;
1500 uint64_t ptp:1; member in struct:cvmx_ciu2_en_ppx_ip2_mio::cvmx_ciu2_en_ppx_ip2_mio_s
1538 uint64_t ptp:1;
1553 uint64_t ptp:1; member in struct:cvmx_ciu2_en_ppx_ip2_mio_w1c::cvmx_ciu2_en_ppx_ip2_mio_w1c_s
1591 uint64_t ptp:1;
1606 uint64_t ptp:1; member in struct:cvmx_ciu2_en_ppx_ip2_mio_w1s::cvmx_ciu2_en_ppx_ip2_mio_w1s_s
1644 uint64_t ptp:1;
2487 uint64_t ptp:1; member in struct:cvmx_ciu2_en_ppx_ip3_mio::cvmx_ciu2_en_ppx_ip3_mio_s
2525 uint64_t ptp:1;
2540 uint64_t ptp:1; member in struct:cvmx_ciu2_en_ppx_ip3_mio_w1c::cvmx_ciu2_en_ppx_ip3_mio_w1c_s
2578 uint64_t ptp:1;
2593 uint64_t ptp:1; member in struct:cvmx_ciu2_en_ppx_ip3_mio_w1s::cvmx_ciu2_en_ppx_ip3_mio_w1s_s
2631 uint64_t ptp:1;
3474 uint64_t ptp:1; member in struct:cvmx_ciu2_en_ppx_ip4_mio::cvmx_ciu2_en_ppx_ip4_mio_s
3512 uint64_t ptp:1;
3527 uint64_t ptp:1; member in struct:cvmx_ciu2_en_ppx_ip4_mio_w1c::cvmx_ciu2_en_ppx_ip4_mio_w1c_s
3565 uint64_t ptp:1;
3580 uint64_t ptp:1; member in struct:cvmx_ciu2_en_ppx_ip4_mio_w1s::cvmx_ciu2_en_ppx_ip4_mio_w1s_s
3618 uint64_t ptp:1;
4477 uint64_t ptp:1; member in struct:cvmx_ciu2_raw_iox_int_mio::cvmx_ciu2_raw_iox_int_mio_s
4515 uint64_t ptp:1;
4791 uint64_t ptp:1; member in struct:cvmx_ciu2_raw_ppx_ip2_mio::cvmx_ciu2_raw_ppx_ip2_mio_s
4829 uint64_t ptp:1;
5105 uint64_t ptp:1; member in struct:cvmx_ciu2_raw_ppx_ip3_mio::cvmx_ciu2_raw_ppx_ip3_mio_s
5143 uint64_t ptp:1;
5419 uint64_t ptp:1; member in struct:cvmx_ciu2_raw_ppx_ip4_mio::cvmx_ciu2_raw_ppx_ip4_mio_s
5457 uint64_t ptp:1;
5748 uint64_t ptp:1; member in struct:cvmx_ciu2_src_iox_int_mio::cvmx_ciu2_src_iox_int_mio_s
5786 uint64_t ptp:1;
6077 uint64_t ptp:1; member in struct:cvmx_ciu2_src_ppx_ip2_mio::cvmx_ciu2_src_ppx_ip2_mio_s
6115 uint64_t ptp:1;
6406 uint64_t ptp:1; member in struct:cvmx_ciu2_src_ppx_ip3_mio::cvmx_ciu2_src_ppx_ip3_mio_s
6444 uint64_t ptp:1;
6735 uint64_t ptp:1; member in struct:cvmx_ciu2_src_ppx_ip4_mio::cvmx_ciu2_src_ppx_ip4_mio_s
6773 uint64_t ptp:1;
H A Dcvmx-pko-defs.h779 uint64_t ptp:1; member in struct:cvmx_pko_mem_debug5::cvmx_pko_mem_debug5_cn61xx
789 uint64_t ptp:1;
800 uint64_t ptp:1; member in struct:cvmx_pko_mem_debug5::cvmx_pko_mem_debug5_cn68xx
810 uint64_t ptp:1;
/linux-4.4.14/Documentation/ptp/
H A Dtestptp.c119 " -c query the ptp clock's capabilities\n" usage()
122 " -f val adjust the ptp clock frequency by 'val' ppb\n" usage()
123 " -g get the ptp clock time\n" usage()
137 " -s set the ptp clock time from the system time\n" usage()
138 " -S set the system time from the ptp clock time\n" usage()
139 " -t val shift the ptp clock time by 'val' seconds\n" usage()
140 " -T val set the ptp clock time to 'val' seconds\n", usage()
/linux-4.4.14/drivers/net/ethernet/intel/ixgbe/
H A Dixgbe_ptp.c207 * @ptp: the ptp clock structure
210 * adjust the frequency of the ptp cycle counter by the
213 static int ixgbe_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb) ixgbe_ptp_adjfreq() argument
216 container_of(ptp, struct ixgbe_adapter, ptp_caps); ixgbe_ptp_adjfreq()
254 * @ptp: the ptp clock structure
259 static int ixgbe_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta) ixgbe_ptp_adjtime() argument
262 container_of(ptp, struct ixgbe_adapter, ptp_caps); ixgbe_ptp_adjtime()
276 * @ptp: the ptp clock structure
282 static int ixgbe_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) ixgbe_ptp_gettime() argument
285 container_of(ptp, struct ixgbe_adapter, ptp_caps); ixgbe_ptp_gettime()
300 * @ptp: the ptp clock structure
306 static int ixgbe_ptp_settime(struct ptp_clock_info *ptp, ixgbe_ptp_settime() argument
310 container_of(ptp, struct ixgbe_adapter, ptp_caps); ixgbe_ptp_settime()
327 * @ptp: the ptp clock structure
334 static int ixgbe_ptp_feature_enable(struct ptp_clock_info *ptp, ixgbe_ptp_feature_enable() argument
338 container_of(ptp, struct ixgbe_adapter, ptp_caps); ixgbe_ptp_feature_enable()
/linux-4.4.14/drivers/net/ethernet/intel/igb/
H A Digb_ptp.c200 static int igb_ptp_adjfreq_82576(struct ptp_clock_info *ptp, s32 ppb) igb_ptp_adjfreq_82576() argument
202 struct igb_adapter *igb = container_of(ptp, struct igb_adapter, igb_ptp_adjfreq_82576()
229 static int igb_ptp_adjfreq_82580(struct ptp_clock_info *ptp, s32 ppb) igb_ptp_adjfreq_82580() argument
231 struct igb_adapter *igb = container_of(ptp, struct igb_adapter, igb_ptp_adjfreq_82580()
255 static int igb_ptp_adjtime_82576(struct ptp_clock_info *ptp, s64 delta) igb_ptp_adjtime_82576() argument
257 struct igb_adapter *igb = container_of(ptp, struct igb_adapter, igb_ptp_adjtime_82576()
268 static int igb_ptp_adjtime_i210(struct ptp_clock_info *ptp, s64 delta) igb_ptp_adjtime_i210() argument
270 struct igb_adapter *igb = container_of(ptp, struct igb_adapter, igb_ptp_adjtime_i210()
286 static int igb_ptp_gettime_82576(struct ptp_clock_info *ptp, igb_ptp_gettime_82576() argument
289 struct igb_adapter *igb = container_of(ptp, struct igb_adapter, igb_ptp_gettime_82576()
305 static int igb_ptp_gettime_i210(struct ptp_clock_info *ptp, igb_ptp_gettime_i210() argument
308 struct igb_adapter *igb = container_of(ptp, struct igb_adapter, igb_ptp_gettime_i210()
321 static int igb_ptp_settime_82576(struct ptp_clock_info *ptp, igb_ptp_settime_82576() argument
324 struct igb_adapter *igb = container_of(ptp, struct igb_adapter, igb_ptp_settime_82576()
340 static int igb_ptp_settime_i210(struct ptp_clock_info *ptp, igb_ptp_settime_i210() argument
343 struct igb_adapter *igb = container_of(ptp, struct igb_adapter, igb_ptp_settime_i210()
474 static int igb_ptp_feature_enable_i210(struct ptp_clock_info *ptp, igb_ptp_feature_enable_i210() argument
478 container_of(ptp, struct igb_adapter, ptp_caps); igb_ptp_feature_enable_i210()
601 static int igb_ptp_feature_enable(struct ptp_clock_info *ptp, igb_ptp_feature_enable() argument
607 static int igb_ptp_verify_pin(struct ptp_clock_info *ptp, unsigned int pin, igb_ptp_verify_pin() argument
/linux-4.4.14/net/ceph/
H A Dauth_x.c154 void **ptp; process_one_ticket() local
214 ptp = &tp; process_one_ticket()
215 tpend = *ptp + dlen; process_one_ticket()
218 ptp = p; process_one_ticket()
221 ceph_decode_32_safe(ptp, tpend, dlen, bad); process_one_ticket()
223 ceph_decode_need(ptp, tpend, 1 + sizeof(u64), bad); process_one_ticket()
224 blob_struct_v = ceph_decode_8(ptp); process_one_ticket()
225 new_secret_id = ceph_decode_64(ptp); process_one_ticket()
226 ret = ceph_decode_buffer(&new_ticket_blob, ptp, tpend); process_one_ticket()
/linux-4.4.14/drivers/net/ethernet/intel/i40e/
H A Di40e_ptp.c114 * @ptp: The PTP clock structure
120 static int i40e_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb) i40e_ptp_adjfreq() argument
122 struct i40e_pf *pf = container_of(ptp, struct i40e_pf, ptp_caps); i40e_ptp_adjfreq()
152 * @ptp: The PTP clock structure
158 static int i40e_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta) i40e_ptp_adjtime() argument
160 struct i40e_pf *pf = container_of(ptp, struct i40e_pf, ptp_caps); i40e_ptp_adjtime()
177 * @ptp: The PTP clock structure
183 static int i40e_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) i40e_ptp_gettime() argument
185 struct i40e_pf *pf = container_of(ptp, struct i40e_pf, ptp_caps); i40e_ptp_gettime()
197 * @ptp: The PTP clock structure
203 static int i40e_ptp_settime(struct ptp_clock_info *ptp, i40e_ptp_settime() argument
206 struct i40e_pf *pf = container_of(ptp, struct i40e_pf, ptp_caps); i40e_ptp_settime()
218 * @ptp: The PTP clock structure
225 static int i40e_ptp_feature_enable(struct ptp_clock_info *ptp, i40e_ptp_feature_enable() argument
/linux-4.4.14/drivers/net/phy/
H A Ddp83640.c375 /* ptp clock methods */
377 static int ptp_dp83640_adjfreq(struct ptp_clock_info *ptp, s32 ppb) ptp_dp83640_adjfreq() argument
380 container_of(ptp, struct dp83640_clock, caps); ptp_dp83640_adjfreq()
410 static int ptp_dp83640_adjtime(struct ptp_clock_info *ptp, s64 delta) ptp_dp83640_adjtime() argument
413 container_of(ptp, struct dp83640_clock, caps); ptp_dp83640_adjtime()
431 static int ptp_dp83640_gettime(struct ptp_clock_info *ptp, ptp_dp83640_gettime() argument
435 container_of(ptp, struct dp83640_clock, caps); ptp_dp83640_gettime()
456 static int ptp_dp83640_settime(struct ptp_clock_info *ptp, ptp_dp83640_settime() argument
460 container_of(ptp, struct dp83640_clock, caps); ptp_dp83640_settime()
473 static int ptp_dp83640_enable(struct ptp_clock_info *ptp, ptp_dp83640_enable() argument
477 container_of(ptp, struct dp83640_clock, caps); ptp_dp83640_enable()
517 static int ptp_dp83640_verify(struct ptp_clock_info *ptp, unsigned int pin, ptp_dp83640_verify() argument
521 container_of(ptp, struct dp83640_clock, caps); ptp_dp83640_verify()
634 * enable broadcast, disable status frames, enable ptp clock recalibrate()
/linux-4.4.14/drivers/clk/mxs/
H A Dclk-imx28.c144 emi_xtal, lcdif_div, etm_div, ptp, saif0_div, saif1_div, enumerator in enum:imx28_clk
209 clks[ptp] = mxs_clk_div("ptp", "ptp_sel", ENET, 21, 6, 27); mx28_clocks_init()
/linux-4.4.14/drivers/clk/mvebu/
H A Darmada-375.c155 { "ptp", NULL, 4 },
/linux-4.4.14/drivers/net/ethernet/octeon/
H A Docteon_mgmt.c697 union cvmx_mio_ptp_clock_cfg ptp; octeon_mgmt_ioctl_hwtstamp() local
710 ptp.u64 = cvmx_read_csr(CVMX_MIO_PTP_CLOCK_CFG); octeon_mgmt_ioctl_hwtstamp()
711 if (!ptp.s.ext_clk_en) { octeon_mgmt_ioctl_hwtstamp()
717 if (!ptp.s.ptp_en) octeon_mgmt_ioctl_hwtstamp()
725 ptp.s.ext_clk_in, octeon_mgmt_ioctl_hwtstamp()
730 if (!ptp.s.ptp_en) { octeon_mgmt_ioctl_hwtstamp()
731 ptp.s.ptp_en = 1; octeon_mgmt_ioctl_hwtstamp()
732 cvmx_write_csr(CVMX_MIO_PTP_CLOCK_CFG, ptp.u64); octeon_mgmt_ioctl_hwtstamp()
/linux-4.4.14/drivers/net/ethernet/adi/
H A Dbfin_mac.c944 static int bfin_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb) bfin_ptp_adjfreq() argument
950 container_of(ptp, struct bfin_mac_local, caps); bfin_ptp_adjfreq()
968 static int bfin_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta) bfin_ptp_adjtime() argument
973 container_of(ptp, struct bfin_mac_local, caps); bfin_ptp_adjtime()
986 static int bfin_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) bfin_ptp_gettime() argument
991 container_of(ptp, struct bfin_mac_local, caps); bfin_ptp_gettime()
1004 static int bfin_ptp_settime(struct ptp_clock_info *ptp, bfin_ptp_settime() argument
1010 container_of(ptp, struct bfin_mac_local, caps); bfin_ptp_settime()
1023 static int bfin_ptp_enable(struct ptp_clock_info *ptp, bfin_ptp_enable() argument
/linux-4.4.14/drivers/net/ethernet/cavium/liquidio/
H A Dlio_main.c1467 * \brief Adjust ptp frequency
1468 * @param ptp PTP clock info
1471 static int liquidio_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb) liquidio_ptp_adjfreq() argument
1473 struct lio *lio = container_of(ptp, struct lio, ptp_info); liquidio_ptp_adjfreq()
1504 * \brief Adjust ptp time
1505 * @param ptp PTP clock info
1508 static int liquidio_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta) liquidio_ptp_adjtime() argument
1511 struct lio *lio = container_of(ptp, struct lio, ptp_info); liquidio_ptp_adjtime()
1522 * @param ptp PTP clock info
1525 static int liquidio_ptp_gettime(struct ptp_clock_info *ptp, liquidio_ptp_gettime() argument
1531 struct lio *lio = container_of(ptp, struct lio, ptp_info); liquidio_ptp_gettime()
1547 * @param ptp PTP clock info
1550 static int liquidio_ptp_settime(struct ptp_clock_info *ptp, liquidio_ptp_settime() argument
1555 struct lio *lio = container_of(ptp, struct lio, ptp_info); liquidio_ptp_settime()
1570 * @param ptp PTP clock info
1574 static int liquidio_ptp_enable(struct ptp_clock_info *ptp, liquidio_ptp_enable() argument
/linux-4.4.14/arch/sparc/mm/
H A Dsrmmu.c114 unsigned long ptp; /* Physical address, shifted right by 4 */ pmd_set() local
117 ptp = __nocache_pa((unsigned long) ptep) >> 4; pmd_set()
119 set_pte((pte_t *)&pmdp->pmdv[i], SRMMU_ET_PTD | ptp); pmd_set()
120 ptp += (SRMMU_REAL_PTRS_PER_PTE*sizeof(pte_t) >> 4); pmd_set()
126 unsigned long ptp; /* Physical address, shifted right by 4 */ pmd_populate() local
129 ptp = page_to_pfn(ptep) << (PAGE_SHIFT-4); /* watch for overflow */ pmd_populate()
131 set_pte((pte_t *)&pmdp->pmdv[i], SRMMU_ET_PTD | ptp); pmd_populate()
132 ptp += (SRMMU_REAL_PTRS_PER_PTE*sizeof(pte_t) >> 4); pmd_populate()
/linux-4.4.14/drivers/net/ethernet/tile/
H A Dtilegx.c235 /* Lock for ptp accessors. */
820 static int ptp_mpipe_adjfreq(struct ptp_clock_info *ptp, s32 ppb) ptp_mpipe_adjfreq() argument
823 struct mpipe_data *md = container_of(ptp, struct mpipe_data, caps); ptp_mpipe_adjfreq()
831 static int ptp_mpipe_adjtime(struct ptp_clock_info *ptp, s64 delta) ptp_mpipe_adjtime() argument
834 struct mpipe_data *md = container_of(ptp, struct mpipe_data, caps); ptp_mpipe_adjtime()
842 static int ptp_mpipe_gettime(struct ptp_clock_info *ptp, ptp_mpipe_gettime() argument
846 struct mpipe_data *md = container_of(ptp, struct mpipe_data, caps); ptp_mpipe_gettime()
854 static int ptp_mpipe_settime(struct ptp_clock_info *ptp, ptp_mpipe_settime() argument
858 struct mpipe_data *md = container_of(ptp, struct mpipe_data, caps); ptp_mpipe_settime()
866 static int ptp_mpipe_enable(struct ptp_clock_info *ptp, ptp_mpipe_enable() argument
/linux-4.4.14/drivers/pinctrl/berlin/
H A Dberlin-bg2.c81 BERLIN_PINCTRL_FUNCTION(0x3, "ptp")),
/linux-4.4.14/drivers/net/ethernet/samsung/sxgbe/
H A Dsxgbe_desc.c427 /* ptp */ sxgbe_rx_ctxt_wbstatus()
/linux-4.4.14/arch/arm/mach-imx/
H A Dmach-imx6q.c199 pr_warn("%s: failed to get ptp clock\n", __func__); imx6q_1588_init()
/linux-4.4.14/drivers/scsi/libfc/
H A Dfc_lport.c236 * @lport: The lport to attach the ptp rport to
237 * @remote_fid: The FID of the ptp rport
238 * @remote_wwpn: The WWPN of the ptp rport
239 * @remote_wwnn: The WWNN of the ptp rport
/linux-4.4.14/drivers/net/ethernet/broadcom/bnx2x/
H A Dbnx2x_main.c13636 static int bnx2x_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb) bnx2x_ptp_adjfreq() argument
13638 struct bnx2x *bp = container_of(ptp, struct bnx2x, ptp_clock_info); bnx2x_ptp_adjfreq()
13704 static int bnx2x_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta) bnx2x_ptp_adjtime() argument
13706 struct bnx2x *bp = container_of(ptp, struct bnx2x, ptp_clock_info); bnx2x_ptp_adjtime()
13715 static int bnx2x_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) bnx2x_ptp_gettime() argument
13717 struct bnx2x *bp = container_of(ptp, struct bnx2x, ptp_clock_info); bnx2x_ptp_gettime()
13729 static int bnx2x_ptp_settime(struct ptp_clock_info *ptp, bnx2x_ptp_settime() argument
13732 struct bnx2x *bp = container_of(ptp, struct bnx2x, ptp_clock_info); bnx2x_ptp_settime()
13746 static int bnx2x_ptp_enable(struct ptp_clock_info *ptp, bnx2x_ptp_enable() argument
13749 struct bnx2x *bp = container_of(ptp, struct bnx2x, ptp_clock_info); bnx2x_ptp_enable()
/linux-4.4.14/security/smack/
H A Dsmack_lsm.c490 * @ptp: parent task pointer
496 static int smack_ptrace_traceme(struct task_struct *ptp) smack_ptrace_traceme() argument
503 rc = smk_ptrace_rule_check(ptp, skp, PTRACE_MODE_ATTACH, __func__); smack_ptrace_traceme()
/linux-4.4.14/drivers/net/ethernet/broadcom/
H A Dtg3.c6173 static int tg3_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb) tg3_ptp_adjfreq() argument
6175 struct tg3 *tp = container_of(ptp, struct tg3, ptp_info); tg3_ptp_adjfreq()
6209 static int tg3_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta) tg3_ptp_adjtime() argument
6211 struct tg3 *tp = container_of(ptp, struct tg3, ptp_info); tg3_ptp_adjtime()
6220 static int tg3_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) tg3_ptp_gettime() argument
6223 struct tg3 *tp = container_of(ptp, struct tg3, ptp_info); tg3_ptp_gettime()
6235 static int tg3_ptp_settime(struct ptp_clock_info *ptp, tg3_ptp_settime() argument
6239 struct tg3 *tp = container_of(ptp, struct tg3, ptp_info); tg3_ptp_settime()
6251 static int tg3_ptp_enable(struct ptp_clock_info *ptp, tg3_ptp_enable() argument
6254 struct tg3 *tp = container_of(ptp, struct tg3, ptp_info); tg3_ptp_enable()
/linux-4.4.14/net/appletalk/
H A Dddp.c354 * there is no non-ptp interface available. atalk_find_primary()

Completed in 8333 milliseconds