From nobody Mon Feb 9 13:57:16 2026 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B55DE16BE0D; Tue, 13 Aug 2024 07:43:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.248 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723534997; cv=none; b=IQvCRswVqSF5AVKQ3vUmfpYUqxjkhUIS/FGLZiGx1FJKPJa2ZXCwbxxrCj7IhsDYsSPz8m8B6IZQMZPL8VrW4mFxwQUxvW2q5C6rPW285M7C3iUaPWiUsZAwzCxSg9kx72hvfeK6csS6KJelM2ctB9nDn50NON/KbZpKBg/IkiU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723534997; c=relaxed/simple; bh=ssJEENgy5ss9s3M0TUQWnQMl4DxbbHNjQueLAsJd1R8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=PiyVWAe6QIUkLU/m0dd9nSUSWnZW2HGwJ2m63+D9W2D97riX/OFQ6+9yuiQI7y2JbWKucXzanENra8JXrDBFBNb54VA/AaR9wdYR/6b0EATOp8tUqwmxnqgw6UrWVWz9UNEyXqez7ai7VmbS09GqTx+teLBTRr1W+QJNuTjZ2TU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=SLVP6D50; arc=none smtp.client-ip=198.47.23.248 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="SLVP6D50" Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 47D7gg5Q063915; Tue, 13 Aug 2024 02:42:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1723534962; bh=9DxTtPjhqkhtEwby4OxHVrNjHh8UouPTMewaWsgVjB4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=SLVP6D50dp3Hrcn0aoGb4CM+i5yLZrYOEtwmsSFtqcYHYJVfojHPaNgpIzqjz24dk a5wwKvAw3b8FSf9M9xwbpFFv6CPXX08a0+BmehZSSoCCVqxipDfXnS03FI+oeKriR6 jmFflWUldDwawhY57G5vl09goqh1Dtm+fa4aLLP8= Received: from DLEE106.ent.ti.com (dlee106.ent.ti.com [157.170.170.36]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 47D7ggcA031434 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 13 Aug 2024 02:42:42 -0500 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 13 Aug 2024 02:42:41 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 13 Aug 2024 02:42:42 -0500 Received: from lelv0854.itg.ti.com (lelv0854.itg.ti.com [10.181.64.140]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 47D7gg84025749; Tue, 13 Aug 2024 02:42:42 -0500 Received: from localhost (danish-tpc.dhcp.ti.com [10.24.69.25]) by lelv0854.itg.ti.com (8.14.7/8.14.7) with ESMTP id 47D7gfEX008731; Tue, 13 Aug 2024 02:42:41 -0500 From: MD Danish Anwar To: Dan Carpenter , Andrew Lunn , Jan Kiszka , Vignesh Raghavendra , Javier Carrasco , Jacob Keller , Diogo Ivo , Simon Horman , Richard Cochran , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" CC: , , , , Roger Quadros , Subject: [PATCH net-next v2 3/7] net: ti: icssg-prueth: Stop hardcoding def_inc Date: Tue, 13 Aug 2024 13:12:29 +0530 Message-ID: <20240813074233.2473876-4-danishanwar@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240813074233.2473876-1-danishanwar@ti.com> References: <20240813074233.2473876-1-danishanwar@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Roger Quadros --- 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/eth= ernet/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 =3D cyclecount & GENMASK(31, 0); sc_desc.cyclecounter1_set =3D (cyclecount & GENMASK(63, 32)) >> 32; sc_desc.iepcount_set =3D ns % cycletime; - sc_desc.CMP0_current =3D cycletime - 4; //Count from 0 to (cycle time)-4 + /* Count from 0 to (cycle time) - emac->iep->def_inc */ + sc_desc.CMP0_current =3D cycletime - emac->iep->def_inc; =20 memcpy_toio(sc_descp, &sc_desc, sizeof(sc_desc)); =20 --=20 2.34.1