#include <linux/clk-provider.h>
#include <linux/err.h>
#include <linux/if.h>
#include <linux/hrtimer.h>
#include <linux/module.h>
#include <linux/net_tstamp.h>
#include <linux/ptp_classify.h>
#include <linux/time.h>
#include <linux/uaccess.h>
#include <linux/workqueue.h>
#include <linux/if_ether.h>
#include <linux/if_vlan.h>
#include "cpts.h"
#define CPTS_SKB_TX_WORK_TIMEOUT …
#define CPTS_SKB_RX_TX_TMO …
#define CPTS_EVENT_RX_TX_TIMEOUT …
struct cpts_skb_cb_data { … };
#define cpts_read32(c, r) …
#define cpts_write32(c, v, r) …
static int cpts_event_port(struct cpts_event *event)
{ … }
static int event_expired(struct cpts_event *event)
{ … }
static int event_type(struct cpts_event *event)
{ … }
static int cpts_fifo_pop(struct cpts *cpts, u32 *high, u32 *low)
{ … }
static int cpts_purge_events(struct cpts *cpts)
{ … }
static void cpts_purge_txq(struct cpts *cpts)
{ … }
static int cpts_fifo_read(struct cpts *cpts, int match)
{ … }
void cpts_misc_interrupt(struct cpts *cpts)
{ … }
EXPORT_SYMBOL_GPL(…);
static u64 cpts_systim_read(const struct cyclecounter *cc)
{ … }
static void cpts_update_cur_time(struct cpts *cpts, int match,
struct ptp_system_timestamp *sts)
{ … }
static int cpts_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
{ … }
static int cpts_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
{ … }
static int cpts_ptp_gettimeex(struct ptp_clock_info *ptp,
struct timespec64 *ts,
struct ptp_system_timestamp *sts)
{ … }
static int cpts_ptp_settime(struct ptp_clock_info *ptp,
const struct timespec64 *ts)
{ … }
static int cpts_extts_enable(struct cpts *cpts, u32 index, int on)
{ … }
static int cpts_ptp_enable(struct ptp_clock_info *ptp,
struct ptp_clock_request *rq, int on)
{ … }
static bool cpts_match_tx_ts(struct cpts *cpts, struct cpts_event *event)
{ … }
static void cpts_process_events(struct cpts *cpts)
{ … }
static long cpts_overflow_check(struct ptp_clock_info *ptp)
{ … }
static const struct ptp_clock_info cpts_info = …;
static int cpts_skb_get_mtype_seqid(struct sk_buff *skb, u32 *mtype_seqid)
{ … }
static u64 cpts_find_ts(struct cpts *cpts, struct sk_buff *skb,
int ev_type, u32 skb_mtype_seqid)
{ … }
void cpts_rx_timestamp(struct cpts *cpts, struct sk_buff *skb)
{ … }
EXPORT_SYMBOL_GPL(…);
void cpts_tx_timestamp(struct cpts *cpts, struct sk_buff *skb)
{ … }
EXPORT_SYMBOL_GPL(…);
int cpts_register(struct cpts *cpts)
{ … }
EXPORT_SYMBOL_GPL(…);
void cpts_unregister(struct cpts *cpts)
{ … }
EXPORT_SYMBOL_GPL(…);
static void cpts_calc_mult_shift(struct cpts *cpts)
{ … }
static void cpts_clk_unregister(void *clk)
{ … }
static void cpts_clk_del_provider(void *np)
{ … }
static int cpts_of_mux_clk_setup(struct cpts *cpts, struct device_node *node)
{ … }
static int cpts_of_parse(struct cpts *cpts, struct device_node *node)
{ … }
struct cpts *cpts_create(struct device *dev, void __iomem *regs,
struct device_node *node, u32 n_ext_ts)
{ … }
EXPORT_SYMBOL_GPL(…);
void cpts_release(struct cpts *cpts)
{ … }
EXPORT_SYMBOL_GPL(…);
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;