diff options
author | Andrew Lunn <andrew@lunn.ch> | 2018-07-18 22:38:23 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-18 15:05:38 -0700 |
commit | ffc705de86e28e7a6e6f8d2e0be73c4181b37b4b (patch) | |
tree | b371cc10993968f4467c567c68cfdd9eda44a40f /drivers/net/dsa/mv88e6xxx/ptp.c | |
parent | dfa543481034ef57cba55585e35eead113f50030 (diff) | |
download | linux-ffc705de86e28e7a6e6f8d2e0be73c4181b37b4b.tar.bz2 |
net: dsa: mv88e6xxx: Abstract HW timestamp setup
The 6165 family does not have per port PTP control registers. Also, it
places the timestamp data in different registers. Abstract the current
implementation of 6352 compatible PTP devices so that 6165 can be
added.
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.c')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/ptp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/ptp.c b/drivers/net/dsa/mv88e6xxx/ptp.c index 485f5676fefb..4963167b9e83 100644 --- a/drivers/net/dsa/mv88e6xxx/ptp.c +++ b/drivers/net/dsa/mv88e6xxx/ptp.c @@ -16,6 +16,7 @@ #include "chip.h" #include "global2.h" +#include "hwtstamp.h" #include "ptp.h" /* Raw timestamps are in units of 8-ns clock periods. */ @@ -318,7 +319,12 @@ const struct mv88e6xxx_ptp_ops mv88e6352_ptp_ops = { .ptp_enable = mv88e6352_ptp_enable, .ptp_verify = mv88e6352_ptp_verify, .event_work = mv88e6352_tai_event_work, + .port_enable = mv88e6352_hwtstamp_port_enable, + .port_disable = mv88e6352_hwtstamp_port_disable, .n_ext_ts = 1, + .arr0_sts_reg = MV88E6XXX_PORT_PTP_ARR0_STS, + .arr1_sts_reg = MV88E6XXX_PORT_PTP_ARR1_STS, + .dep_sts_reg = MV88E6XXX_PORT_PTP_DEP_STS, }; const struct mv88e6xxx_ptp_ops mv88e6165_ptp_ops = { |