From f15978a76c0d6a6e80db1778f5debc2365b929fc Mon Sep 17 00:00:00 2001
From: Vignesh Raghavendra <vigneshr@ti.com>
Date: Thu, 14 Oct 2021 14:26:54 +0530
Subject: [PATCH] net: ethernet: ti: icssg_prueth: Export prueth_iep_gettime()
 to be used for TAPRIO support

We need to know current IEP time to calculate cycles to wait before
applying taprio depending on base_time configured. Therefore export
preuth_iep_getttime to be used for taprio support

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
---
 drivers/net/ethernet/ti/icssg_prueth.c | 2 +-
 drivers/net/ethernet/ti/icssg_prueth.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ti/icssg_prueth.c b/drivers/net/ethernet/ti/icssg_prueth.c
index 95e383a01bc8..8421272fad8a 100644
--- a/drivers/net/ethernet/ti/icssg_prueth.c
+++ b/drivers/net/ethernet/ti/icssg_prueth.c
@@ -1440,7 +1440,7 @@ static void prueth_reset_rx_chan(struct prueth_rx_chn *chn,
 		k3_udma_glue_disable_rx_chn(chn->rx_chn);
 }
 
-static u64 prueth_iep_gettime(void *clockops_data, struct ptp_system_timestamp *sts)
+u64 prueth_iep_gettime(void *clockops_data, struct ptp_system_timestamp *sts)
 {
 	u32 hi_rollover_count, hi_rollover_count_r;
 	struct prueth_emac *emac = clockops_data;
diff --git a/drivers/net/ethernet/ti/icssg_prueth.h b/drivers/net/ethernet/ti/icssg_prueth.h
index f1b986493218..2aeca9c1e4db 100644
--- a/drivers/net/ethernet/ti/icssg_prueth.h
+++ b/drivers/net/ethernet/ti/icssg_prueth.h
@@ -349,4 +349,5 @@ void icssg_set_pvid(struct prueth *prueth, u8 vid, u8 port);
 #define prueth_napi_to_tx_chn(pnapi) \
 	container_of(pnapi, struct prueth_tx_chn, napi_tx)
 
+u64 prueth_iep_gettime(void *clockops_data, struct ptp_system_timestamp *sts);
 #endif /* __NET_TI_ICSSG_PRUETH_H */
