[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240813074233.2473876-4-danishanwar@ti.com>
Date: Tue, 13 Aug 2024 13:12:29 +0530
From: MD Danish Anwar <danishanwar@...com>
To: Dan Carpenter <dan.carpenter@...aro.org>, Andrew Lunn <andrew@...n.ch>,
Jan Kiszka <jan.kiszka@...mens.com>,
Vignesh Raghavendra <vigneshr@...com>,
Javier Carrasco <javier.carrasco.cruz@...il.com>,
Jacob Keller
<jacob.e.keller@...el.com>,
Diogo Ivo <diogo.ivo@...mens.com>, Simon Horman
<horms@...nel.org>,
Richard Cochran <richardcochran@...il.com>,
Paolo Abeni
<pabeni@...hat.com>, Jakub Kicinski <kuba@...nel.org>,
Eric Dumazet
<edumazet@...gle.com>,
"David S. Miller" <davem@...emloft.net>
CC: <linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>, <srk@...com>,
Roger Quadros
<rogerq@...nel.org>, <danishanwar@...com>
Subject: [PATCH net-next v2 3/7] net: ti: icssg-prueth: Stop hardcoding def_inc
The def_inc is stored in icss_iep structure. Currently default increment
(ns per clock tick) is hardcoded to 4 (Clock frequency being 250 MHz).
Change this to use the iep->def_inc variable as the iep structure is now
accessible to the driver files.
Signed-off-by: MD Danish Anwar <danishanwar@...com>
---
drivers/net/ethernet/ti/icssg/icssg_prueth.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ti/icssg/icssg_prueth.c b/drivers/net/ethernet/ti/icssg/icssg_prueth.c
index 613bd8de6eb8..c93071e05c37 100644
--- a/drivers/net/ethernet/ti/icssg/icssg_prueth.c
+++ b/drivers/net/ethernet/ti/icssg/icssg_prueth.c
@@ -365,7 +365,8 @@ static void prueth_iep_settime(void *clockops_data, u64 ns)
sc_desc.cyclecounter0_set = cyclecount & GENMASK(31, 0);
sc_desc.cyclecounter1_set = (cyclecount & GENMASK(63, 32)) >> 32;
sc_desc.iepcount_set = ns % cycletime;
- sc_desc.CMP0_current = cycletime - 4; //Count from 0 to (cycle time)-4
+ /* Count from 0 to (cycle time) - emac->iep->def_inc */
+ sc_desc.CMP0_current = cycletime - emac->iep->def_inc;
memcpy_toio(sc_descp, &sc_desc, sizeof(sc_desc));
--
2.34.1
Powered by blists - more mailing lists