From 9ab5ec59c8a9cc0e4b94252b48200b6023c716aa Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Thu, 1 Aug 2013 11:36:42 -0400 Subject: tile: support PTP using the tilegx mPIPE (IEEE 1588) Signed-off-by: Chris Metcalf Acked-by: Richard Cochran Signed-off-by: David S. Miller --- arch/tile/gxio/iorpc_mpipe.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'arch/tile/gxio') 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, EXPORT_SYMBOL(gxio_mpipe_adjust_timestamp_aux); +struct adjust_timestamp_freq_param { + int32_t ppb; +}; + +int gxio_mpipe_adjust_timestamp_freq(gxio_mpipe_context_t * context, + int32_t ppb) +{ + struct adjust_timestamp_freq_param temp; + struct adjust_timestamp_freq_param *params = &temp; + + params->ppb = ppb; + + return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, + sizeof(*params), + GXIO_MPIPE_OP_ADJUST_TIMESTAMP_FREQ); +} + +EXPORT_SYMBOL(gxio_mpipe_adjust_timestamp_freq); + struct config_edma_ring_blks_param { unsigned int ering; unsigned int max_blks; -- cgit v1.2.3