OSDN Git Service

net: dsa: microchip: ptp: enable interrupt for timestamping
authorArun Ramadoss <arun.ramadoss@microchip.com>
Tue, 10 Jan 2023 08:49:22 +0000 (14:19 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Jan 2023 08:40:41 +0000 (08:40 +0000)
commitcc13ab18b201ab630f03511060ba289b70052959
tree6f17fe9dea678e67fa615d1e364891e228914aaf
parentbb01ad30570b09eb83438093cd7d29f04410b12e
net: dsa: microchip: ptp: enable interrupt for timestamping

PTP Interrupt mask and status register differ from the global and port
interrupt mechanism by two methods. One is that for global/port
interrupt enabling we have to clear the bit but for ptp interrupt we
have to set the bit. And other is bit12:0 is reserved in ptp interrupt
registers. This forced to not use the generic implementation of
global/port interrupt method routine. This patch implement the ptp
interrupt mechanism to read the timestamp register for sync, pdelay_req
and pdelay_resp.

Signed-off-by: Arun Ramadoss <arun.ramadoss@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/microchip/ksz_common.c
drivers/net/dsa/microchip/ksz_common.h
drivers/net/dsa/microchip/ksz_ptp.c
drivers/net/dsa/microchip/ksz_ptp.h
drivers/net/dsa/microchip/ksz_ptp_reg.h