#ifndef _MV88E6XXX_PTP_H
#define _MV88E6XXX_PTP_H
#include "chip.h"
#define MV88E6XXX_TAI_CFG …
#define MV88E6XXX_TAI_CFG_CAP_OVERWRITE …
#define MV88E6XXX_TAI_CFG_CAP_CTR_START …
#define MV88E6XXX_TAI_CFG_EVREQ_FALLING …
#define MV88E6XXX_TAI_CFG_TRIG_ACTIVE_LO …
#define MV88E6XXX_TAI_CFG_IRL_ENABLE …
#define MV88E6XXX_TAI_CFG_TRIG_IRQ_EN …
#define MV88E6XXX_TAI_CFG_EVREQ_IRQ_EN …
#define MV88E6XXX_TAI_CFG_TRIG_LOCK …
#define MV88E6XXX_TAI_CFG_BLOCK_UPDATE …
#define MV88E6XXX_TAI_CFG_MULTI_PTP …
#define MV88E6XXX_TAI_CFG_TRIG_MODE_ONESHOT …
#define MV88E6XXX_TAI_CFG_TRIG_ENABLE …
#define MV88E6XXX_TAI_CLOCK_PERIOD …
#define MV88E6XXX_TAI_TRIG_GEN_AMOUNT_LO …
#define MV88E6XXX_TAI_TRIG_GEN_AMOUNT_HI …
#define MV88E6XXX_TAI_TRIG_CLOCK_COMP …
#define MV88E6XXX_TAI_TRIG_CFG …
#define MV88E6XXX_TAI_IRL_AMOUNT …
#define MV88E6XXX_TAI_IRL_COMP …
#define MV88E6XXX_TAI_IRL_COMP_PS …
#define MV88E6XXX_TAI_EVENT_STATUS …
#define MV88E6XXX_TAI_EVENT_STATUS_CAP_TRIG …
#define MV88E6XXX_TAI_EVENT_STATUS_ERROR …
#define MV88E6XXX_TAI_EVENT_STATUS_VALID …
#define MV88E6XXX_TAI_EVENT_STATUS_CTR_MASK …
#define MV88E6XXX_TAI_EVENT_TIME_LO …
#define MV88E6XXX_TAI_EVENT_TYPE_HI …
#define MV88E6XXX_TAI_TIME_LO …
#define MV88E6XXX_TAI_TIME_HI …
#define MV88E6XXX_TAI_TRIG_TIME_LO …
#define MV88E6XXX_TAI_TRIG_TIME_HI …
#define MV88E6XXX_TAI_LOCK_STATUS …
#define MV88E6XXX_PTP_GC_ETYPE …
#define MV88E6XXX_PTP_GC_ETYPE …
#define MV88E6XXX_PTP_GC_MESSAGE_ID …
#define MV88E6XXX_PTP_GC_TS_ARR_PTR …
#define MV88E6XXX_PTP_GC_PORT_ARR_INT_EN …
#define MV88E6XXX_PTP_GC_PORT_DEP_INT_EN …
#define MV88E6XXX_PTP_GC_CONFIG …
#define MV88E6XXX_PTP_GC_CONFIG_DIS_OVERWRITE …
#define MV88E6XXX_PTP_GC_CONFIG_DIS_TS …
#define MV88E6XXX_PTP_GC_INT_STATUS …
#define MV88E6XXX_PTP_GC_TIME_LO …
#define MV88E6XXX_PTP_GC_TIME_HI …
#define MV88E6165_PORT_PTP_ARR0_STS …
#define MV88E6165_PORT_PTP_ARR0_TIME_LO …
#define MV88E6165_PORT_PTP_ARR0_TIME_HI …
#define MV88E6165_PORT_PTP_ARR0_SEQID …
#define MV88E6165_PORT_PTP_ARR1_STS …
#define MV88E6165_PORT_PTP_ARR1_TIME_LO …
#define MV88E6165_PORT_PTP_ARR1_TIME_HI …
#define MV88E6165_PORT_PTP_ARR1_SEQID …
#define MV88E6165_PORT_PTP_DEP_STS …
#define MV88E6165_PORT_PTP_DEP_TIME_LO …
#define MV88E6165_PORT_PTP_DEP_TIME_HI …
#define MV88E6165_PORT_PTP_DEP_SEQID …
#define MV88E6164_PORT_STATUS …
#ifdef CONFIG_NET_DSA_MV88E6XXX_PTP
long mv88e6xxx_hwtstamp_work(struct ptp_clock_info *ptp);
int mv88e6xxx_ptp_setup(struct mv88e6xxx_chip *chip);
void mv88e6xxx_ptp_free(struct mv88e6xxx_chip *chip);
#define ptp_to_chip(ptp) …
extern const struct mv88e6xxx_ptp_ops mv88e6165_ptp_ops;
extern const struct mv88e6xxx_ptp_ops mv88e6250_ptp_ops;
extern const struct mv88e6xxx_ptp_ops mv88e6352_ptp_ops;
extern const struct mv88e6xxx_ptp_ops mv88e6390_ptp_ops;
#else
static inline long mv88e6xxx_hwtstamp_work(struct ptp_clock_info *ptp)
{
return -1;
}
static inline int mv88e6xxx_ptp_setup(struct mv88e6xxx_chip *chip)
{
return 0;
}
static inline void mv88e6xxx_ptp_free(struct mv88e6xxx_chip *chip)
{
}
static const struct mv88e6xxx_ptp_ops mv88e6165_ptp_ops = {};
static const struct mv88e6xxx_ptp_ops mv88e6250_ptp_ops = {};
static const struct mv88e6xxx_ptp_ops mv88e6352_ptp_ops = {};
static const struct mv88e6xxx_ptp_ops mv88e6390_ptp_ops = {};
#endif
#endif