ptp.h (8858ccc837e6e89c917f4b4bb1d7335d62e1baab) ptp.h (7150961487c5b4521ef5b6557373546e370709d2)
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * Marvell 88E6xxx Switch PTP support
4 *
5 * Copyright (c) 2008 Marvell Semiconductor
6 *
7 * Copyright (c) 2017 National Instruments
8 * Erik Hons <erik.hons@ni.com>

--- 135 unchanged lines hidden (view full) ---

144long mv88e6xxx_hwtstamp_work(struct ptp_clock_info *ptp);
145int mv88e6xxx_ptp_setup(struct mv88e6xxx_chip *chip);
146void mv88e6xxx_ptp_free(struct mv88e6xxx_chip *chip);
147
148#define ptp_to_chip(ptp) container_of(ptp, struct mv88e6xxx_chip, \
149 ptp_clock_info)
150
151extern const struct mv88e6xxx_ptp_ops mv88e6165_ptp_ops;
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * Marvell 88E6xxx Switch PTP support
4 *
5 * Copyright (c) 2008 Marvell Semiconductor
6 *
7 * Copyright (c) 2017 National Instruments
8 * Erik Hons <erik.hons@ni.com>

--- 135 unchanged lines hidden (view full) ---

144long mv88e6xxx_hwtstamp_work(struct ptp_clock_info *ptp);
145int mv88e6xxx_ptp_setup(struct mv88e6xxx_chip *chip);
146void mv88e6xxx_ptp_free(struct mv88e6xxx_chip *chip);
147
148#define ptp_to_chip(ptp) container_of(ptp, struct mv88e6xxx_chip, \
149 ptp_clock_info)
150
151extern const struct mv88e6xxx_ptp_ops mv88e6165_ptp_ops;
152extern const struct mv88e6xxx_ptp_ops mv88e6250_ptp_ops;
152extern const struct mv88e6xxx_ptp_ops mv88e6352_ptp_ops;
153
154#else /* !CONFIG_NET_DSA_MV88E6XXX_PTP */
155
156static inline long mv88e6xxx_hwtstamp_work(struct ptp_clock_info *ptp)
157{
158 return -1;
159}
160
161static inline int mv88e6xxx_ptp_setup(struct mv88e6xxx_chip *chip)
162{
163 return 0;
164}
165
166static inline void mv88e6xxx_ptp_free(struct mv88e6xxx_chip *chip)
167{
168}
169
170static const struct mv88e6xxx_ptp_ops mv88e6165_ptp_ops = {};
153extern const struct mv88e6xxx_ptp_ops mv88e6352_ptp_ops;
154
155#else /* !CONFIG_NET_DSA_MV88E6XXX_PTP */
156
157static inline long mv88e6xxx_hwtstamp_work(struct ptp_clock_info *ptp)
158{
159 return -1;
160}
161
162static inline int mv88e6xxx_ptp_setup(struct mv88e6xxx_chip *chip)
163{
164 return 0;
165}
166
167static inline void mv88e6xxx_ptp_free(struct mv88e6xxx_chip *chip)
168{
169}
170
171static const struct mv88e6xxx_ptp_ops mv88e6165_ptp_ops = {};
172static const struct mv88e6xxx_ptp_ops mv88e6250_ptp_ops = {};
171static const struct mv88e6xxx_ptp_ops mv88e6352_ptp_ops = {};
172
173#endif /* CONFIG_NET_DSA_MV88E6XXX_PTP */
174
175#endif /* _MV88E6XXX_PTP_H */
173static const struct mv88e6xxx_ptp_ops mv88e6352_ptp_ops = {};
174
175#endif /* CONFIG_NET_DSA_MV88E6XXX_PTP */
176
177#endif /* _MV88E6XXX_PTP_H */