diff options
author | Chintan Vankar <c-vankar@ti.com> | 2024-04-19 10:26:25 +0200 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2024-04-23 12:07:23 +0200 |
commit | c459f606f66dfdb14aef5a7927c2f4b274682fee (patch) | |
tree | 26a1501a49b19a9bbd42b4f95ef1f1506f3ab8f9 /drivers/net/ethernet/ti/am65-cpts.h | |
parent | Merge branch 'read-phy-address-of-switch-from-device-tree-on-mt7530-dsa-subdr... (diff) | |
download | linux-c459f606f66dfdb14aef5a7927c2f4b274682fee.tar.xz linux-c459f606f66dfdb14aef5a7927c2f4b274682fee.zip |
net: ethernet: ti: am65-cpts: Enable RX HW timestamp for PTP packets using CPTS FIFO
Add a new function "am65_cpts_rx_timestamp()" which checks for PTP
packets from header and timestamps them.
Add another function "am65_cpts_find_rx_ts()" which finds CPTS FIFO
Event to get the timestamp of received PTP packet.
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ethernet/ti/am65-cpts.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ti/am65-cpts.h b/drivers/net/ethernet/ti/am65-cpts.h index 6e14df0be113..90296968a75c 100644 --- a/drivers/net/ethernet/ti/am65-cpts.h +++ b/drivers/net/ethernet/ti/am65-cpts.h @@ -22,6 +22,7 @@ void am65_cpts_release(struct am65_cpts *cpts); struct am65_cpts *am65_cpts_create(struct device *dev, void __iomem *regs, struct device_node *node); int am65_cpts_phc_index(struct am65_cpts *cpts); +void am65_cpts_rx_timestamp(struct am65_cpts *cpts, struct sk_buff *skb); void am65_cpts_tx_timestamp(struct am65_cpts *cpts, struct sk_buff *skb); void am65_cpts_prep_tx_timestamp(struct am65_cpts *cpts, struct sk_buff *skb); void am65_cpts_rx_enable(struct am65_cpts *cpts, bool en); @@ -48,6 +49,11 @@ static inline int am65_cpts_phc_index(struct am65_cpts *cpts) return -1; } +static inline void am65_cpts_rx_timestamp(struct am65_cpts *cpts, + struct sk_buff *skb) +{ +} + static inline void am65_cpts_tx_timestamp(struct am65_cpts *cpts, struct sk_buff *skb) { |