1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /* TI K3 AM65 CPTS driver interface
4 * Copyright (C) 2020 Texas Instruments Incorporated - http://www.ti.com
10 #include <linux/device.h>
15 struct am65_cpts_estf_cfg {
20 #if IS_ENABLED(CONFIG_TI_K3_AM65_CPTS)
21 struct am65_cpts *am65_cpts_create(struct device *dev, void __iomem *regs,
22 struct device_node *node);
23 int am65_cpts_phc_index(struct am65_cpts *cpts);
24 void am65_cpts_tx_timestamp(struct am65_cpts *cpts, struct sk_buff *skb);
25 void am65_cpts_prep_tx_timestamp(struct am65_cpts *cpts, struct sk_buff *skb);
26 void am65_cpts_rx_enable(struct am65_cpts *cpts, bool en);
27 u64 am65_cpts_ns_gettime(struct am65_cpts *cpts);
28 int am65_cpts_estf_enable(struct am65_cpts *cpts, int idx,
29 struct am65_cpts_estf_cfg *cfg);
30 void am65_cpts_estf_disable(struct am65_cpts *cpts, int idx);
32 static inline struct am65_cpts *am65_cpts_create(struct device *dev,
34 struct device_node *node)
36 return ERR_PTR(-EOPNOTSUPP);
39 static inline int am65_cpts_phc_index(struct am65_cpts *cpts)
44 static inline void am65_cpts_tx_timestamp(struct am65_cpts *cpts,
49 static inline void am65_cpts_prep_tx_timestamp(struct am65_cpts *cpts,
54 static inline void am65_cpts_rx_enable(struct am65_cpts *cpts, bool en)
58 static inline s64 am65_cpts_ns_gettime(struct am65_cpts *cpts)
63 static inline int am65_cpts_estf_enable(struct am65_cpts *cpts, int idx,
64 struct am65_cpts_estf_cfg *cfg)
69 static inline void am65_cpts_estf_disable(struct am65_cpts *cpts, int idx)
74 #endif /* K3_CPTS_H_ */