linux/drivers/net/ethernet/cadence/macb_ptp.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * 1588 PTP support for Cadence GEM device.
 *
 * Copyright (C) 2017 Cadence Design Systems - https://www.cadence.com
 *
 * Authors: Rafal Ozieblo <[email protected]>
 *          Bartosz Folta <[email protected]>
 */
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/clk.h>
#include <linux/device.h>
#include <linux/etherdevice.h>
#include <linux/platform_device.h>
#include <linux/time64.h>
#include <linux/ptp_classify.h>
#include <linux/if_ether.h>
#include <linux/if_vlan.h>
#include <linux/net_tstamp.h>
#include <linux/circ_buf.h>
#include <linux/spinlock.h>

#include "macb.h"

#define GEM_PTP_TIMER_NAME

static struct macb_dma_desc_ptp *macb_ptp_desc(struct macb *bp,
					       struct macb_dma_desc *desc)
{}

static int gem_tsu_get_time(struct ptp_clock_info *ptp, struct timespec64 *ts,
			    struct ptp_system_timestamp *sts)
{}

static int gem_tsu_set_time(struct ptp_clock_info *ptp,
			    const struct timespec64 *ts)
{}

static int gem_tsu_incr_set(struct macb *bp, struct tsu_incr *incr_spec)
{}

static int gem_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
{}

static int gem_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
{}

static int gem_ptp_enable(struct ptp_clock_info *ptp,
			  struct ptp_clock_request *rq, int on)
{}

static const struct ptp_clock_info gem_ptp_caps_template =;

static void gem_ptp_init_timer(struct macb *bp)
{}

static void gem_ptp_init_tsu(struct macb *bp)
{}

static void gem_ptp_clear_timer(struct macb *bp)
{}

static int gem_hw_timestamp(struct macb *bp, u32 dma_desc_ts_1,
			    u32 dma_desc_ts_2, struct timespec64 *ts)
{}

void gem_ptp_rxstamp(struct macb *bp, struct sk_buff *skb,
		     struct macb_dma_desc *desc)
{}

void gem_ptp_txstamp(struct macb *bp, struct sk_buff *skb,
		     struct macb_dma_desc *desc)
{}

void gem_ptp_init(struct net_device *dev)
{}

void gem_ptp_remove(struct net_device *ndev)
{}

static int gem_ptp_set_ts_mode(struct macb *bp,
			       enum macb_bd_control tx_bd_control,
			       enum macb_bd_control rx_bd_control)
{}

int gem_get_hwtst(struct net_device *dev,
		  struct kernel_hwtstamp_config *tstamp_config)
{}

static void gem_ptp_set_one_step_sync(struct macb *bp, u8 enable)
{}

int gem_set_hwtst(struct net_device *dev,
		  struct kernel_hwtstamp_config *tstamp_config,
		  struct netlink_ext_ack *extack)
{}