#include <linux/ptp_classify.h>
#include "sparx5_main_regs.h"
#include "sparx5_main.h"
#define SPARX5_MAX_PTP_ID …
#define TOD_ACC_PIN …
enum { … };
static u64 sparx5_ptp_get_1ppm(struct sparx5 *sparx5)
{ … }
static u64 sparx5_ptp_get_nominal_value(struct sparx5 *sparx5)
{ … }
int sparx5_ptp_hwtstamp_set(struct sparx5_port *port,
struct kernel_hwtstamp_config *cfg,
struct netlink_ext_ack *extack)
{ … }
void sparx5_ptp_hwtstamp_get(struct sparx5_port *port,
struct kernel_hwtstamp_config *cfg)
{ … }
static void sparx5_ptp_classify(struct sparx5_port *port, struct sk_buff *skb,
u8 *rew_op, u8 *pdu_type, u8 *pdu_w16_offset)
{ … }
static void sparx5_ptp_txtstamp_old_release(struct sparx5_port *port)
{ … }
int sparx5_ptp_txtstamp_request(struct sparx5_port *port,
struct sk_buff *skb)
{ … }
void sparx5_ptp_txtstamp_release(struct sparx5_port *port,
struct sk_buff *skb)
{ … }
static void sparx5_get_hwtimestamp(struct sparx5 *sparx5,
struct timespec64 *ts,
u32 nsec)
{ … }
irqreturn_t sparx5_ptp_irq_handler(int irq, void *args)
{ … }
static int sparx5_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
{ … }
static int sparx5_ptp_settime64(struct ptp_clock_info *ptp,
const struct timespec64 *ts)
{ … }
int sparx5_ptp_gettime64(struct ptp_clock_info *ptp, struct timespec64 *ts)
{ … }
static int sparx5_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
{ … }
static struct ptp_clock_info sparx5_ptp_clock_info = …;
static int sparx5_ptp_phc_init(struct sparx5 *sparx5,
int index,
struct ptp_clock_info *clock_info)
{ … }
int sparx5_ptp_init(struct sparx5 *sparx5)
{ … }
void sparx5_ptp_deinit(struct sparx5 *sparx5)
{ … }
void sparx5_ptp_rxtstamp(struct sparx5 *sparx5, struct sk_buff *skb,
u64 timestamp)
{ … }