From 6c2fa3e0c859d74cb4df99bda2d384ed975b2f99 Mon Sep 17 00:00:00 2001
From: Grygorii Strashko <grygorii.strashko@ti.com>
Date: Tue, 18 May 2021 23:37:27 +0300
Subject: [PATCH] net: ethernet: ti: icss_iep: use readl() in
 icss_iep_get_count_low/hi()

Use readl() in icss_iep_get_count_low/hi() to speed up hot path.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
---
 drivers/net/ethernet/ti/icss_iep.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/ti/icss_iep.c b/drivers/net/ethernet/ti/icss_iep.c
index 51f8717fc446..23e72e0ffe46 100644
--- a/drivers/net/ethernet/ti/icss_iep.c
+++ b/drivers/net/ethernet/ti/icss_iep.c
@@ -147,7 +147,7 @@ int icss_iep_get_count_hi(struct icss_iep *iep)
 	u32 val = 0;
 
 	if (iep && (iep->plat_data->flags & ICSS_IEP_64BIT_COUNTER_SUPPORT))
-		regmap_read(iep->map, ICSS_IEP_COUNT_REG1, &val);
+		val = icss_iep_readl(iep, ICSS_IEP_COUNT_REG1);
 
 	return val;
 }
@@ -164,7 +164,7 @@ int icss_iep_get_count_low(struct icss_iep *iep)
 	u32 val = 0;
 
 	if (iep)
-		regmap_read(iep->map, ICSS_IEP_COUNT_REG0, &val);
+		val = icss_iep_readl(iep, ICSS_IEP_COUNT_REG0);
 
 	return val;
 }
