diff options
author | Chris Metcalf <cmetcalf@tilera.com> | 2013-08-01 11:36:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-01 17:35:51 -0400 |
commit | 9ab5ec59c8a9cc0e4b94252b48200b6023c716aa (patch) | |
tree | fa9084e9bbb9eaf85689723d1b6e2c957f095a57 /arch/tile/gxio/iorpc_mpipe.c | |
parent | 84e181ba3607a4e1175d929c346c72f9bfa1ab02 (diff) |
tile: support PTP using the tilegx mPIPE (IEEE 1588)
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/tile/gxio/iorpc_mpipe.c')
-rw-r--r-- | arch/tile/gxio/iorpc_mpipe.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/tile/gxio/iorpc_mpipe.c b/arch/tile/gxio/iorpc_mpipe.c index c2fb15167aee..4f8f3d619c4a 100644 --- a/arch/tile/gxio/iorpc_mpipe.c +++ b/arch/tile/gxio/iorpc_mpipe.c | |||
@@ -475,6 +475,25 @@ int gxio_mpipe_adjust_timestamp_aux(gxio_mpipe_context_t * context, | |||
475 | 475 | ||
476 | EXPORT_SYMBOL(gxio_mpipe_adjust_timestamp_aux); | 476 | EXPORT_SYMBOL(gxio_mpipe_adjust_timestamp_aux); |
477 | 477 | ||
478 | struct adjust_timestamp_freq_param { | ||
479 | int32_t ppb; | ||
480 | }; | ||
481 | |||
482 | int gxio_mpipe_adjust_timestamp_freq(gxio_mpipe_context_t * context, | ||
483 | int32_t ppb) | ||
484 | { | ||
485 | struct adjust_timestamp_freq_param temp; | ||
486 | struct adjust_timestamp_freq_param *params = &temp; | ||
487 | |||
488 | params->ppb = ppb; | ||
489 | |||
490 | return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, | ||
491 | sizeof(*params), | ||
492 | GXIO_MPIPE_OP_ADJUST_TIMESTAMP_FREQ); | ||
493 | } | ||
494 | |||
495 | EXPORT_SYMBOL(gxio_mpipe_adjust_timestamp_freq); | ||
496 | |||
478 | struct config_edma_ring_blks_param { | 497 | struct config_edma_ring_blks_param { |
479 | unsigned int ering; | 498 | unsigned int ering; |
480 | unsigned int max_blks; | 499 | unsigned int max_blks; |