aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/mv88e6xxx/ptp.h
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2018-07-18 22:38:20 +0200
committerDavid S. Miller <davem@davemloft.net>2018-07-18 15:05:38 -0700
commit6d2ac8ee67d335983f1c9106fc8deebb89290505 (patch)
tree99d7c7f21f61f32a7f0dab5748dd1813b0513a56 /drivers/net/dsa/mv88e6xxx/ptp.h
parentMerge branch 'bcm-OF-deps' (diff)
downloadlinux-dev-6d2ac8ee67d335983f1c9106fc8deebb89290505.tar.xz
linux-dev-6d2ac8ee67d335983f1c9106fc8deebb89290505.zip
net: dsa: mv88e6xxx: Abstract PTP operations
The mv88e6165 family supports PTP, but its registers use a different layout to the currently supported devices. Abstract accessing the PTP registers into a set of ops, so making space for a second implementation. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx/ptp.h')
-rw-r--r--drivers/net/dsa/mv88e6xxx/ptp.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/ptp.h b/drivers/net/dsa/mv88e6xxx/ptp.h
index 10f271ab650d..16a310679f12 100644
--- a/drivers/net/dsa/mv88e6xxx/ptp.h
+++ b/drivers/net/dsa/mv88e6xxx/ptp.h
@@ -87,6 +87,8 @@ void mv88e6xxx_ptp_free(struct mv88e6xxx_chip *chip);
#define ptp_to_chip(ptp) container_of(ptp, struct mv88e6xxx_chip, \
ptp_clock_info)
+extern const struct mv88e6xxx_ptp_ops mv88e6352_ptp_ops;
+
#else /* !CONFIG_NET_DSA_MV88E6XXX_PTP */
static inline long mv88e6xxx_hwtstamp_work(struct ptp_clock_info *ptp)
@@ -103,6 +105,8 @@ static inline void mv88e6xxx_ptp_free(struct mv88e6xxx_chip *chip)
{
}
+static const struct mv88e6xxx_ptp_ops mv88e6352_ptp_ops = {};
+
#endif /* CONFIG_NET_DSA_MV88E6XXX_PTP */
#endif /* _MV88E6XXX_PTP_H */