From patchwork Thu Nov 30 18:46:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Min Li X-Patchwork-Id: 13474813 X-Patchwork-Delegate: kuba@kernel.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=hotmail.com header.i=@hotmail.com header.b="RTEFs+MF" Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11olkn2039.outbound.protection.outlook.com [40.92.18.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48C2210F0; Thu, 30 Nov 2023 10:46:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZcOwEytcXFRwpvFqGr94x1W3RfkmbsU14VDBRn0Yvni62zcR26Aa43DOQZKW3XGszHbFL8UeBS4Mfvb65KwtfjVQUAiZQzCDVtdwIdGZJtGd70gXEqFMJaU51yXOTKSQGBOxmXlnXfApkIB2oO2GkwIYt9F2vdQ4Opaxl/sl9pmqYX0ATruEdOhOvn53wkno3+6mam/DtBzGGQ6LNd7v4BC9MnYgsBMyjncymNVEywXfCUryPwn3aAqVe4kpX3yo2DaXwLeaRynxdgzV8WK1wery5rBIVi6FIVFgRBDy9/plv5AdRuOUueMkAEjP1igw3PYY7kK5pDl/OjeV6/Hznw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tCR4dH+nSgJwKX/AKlXC9LZZ9ptdyMnaaKrpFcXKJSc=; b=U08RDgAEnQxQFkiyhnPnHK1h6nDuTHgvBB0GR79ii/HMIcsMdj4B474mvPn/zqvcEL/jg1VGs0MyfXZHqHglVQfY+parHsHZAcGYeNq+Igw8Gkj1++nHEfMqvIFx5y3KPCBpbpK1NnzI2XQuvPcDstKjiE/GX6zeSfcpKiVfEq+wwxW6aFc26K46aBp+kjjAiULjaB+dl0TmIpYvoa4klfFjKApBLNv55cGTZw003SlUCpIcihZzz0eAZcTU2+aSM0MneAK9NcJlwDwbiBHLeGSH3G/u/oWrjhuQn7DqWNijvaPXPNzx/1AyTOkFENErqQhHXkqDewSj1Oc8rtDUdQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tCR4dH+nSgJwKX/AKlXC9LZZ9ptdyMnaaKrpFcXKJSc=; b=RTEFs+MFwPa4FT0myzLvee5LDONmJp9fyKYrji2S94ECkEcqaBfrj7/o4PaE5qxLolvoADz6GOsUmmM2R4bJ7losjWxzJdqrKrbYdr4NgG58Rifx7eoU36kCxliRdK48a9rWRie1ahaxQhdpY6AjERB+AxEHXgSI1Yrlr41bIdqNsGFzNwBTvonEKKiKag9nYOdXgKWLtHeq56GvALHFmzqOEPwPlwlDFndrP5uGhJi895VjiaQ4UBE5qJYeNONRT28Okkv5umWuveILpsz+b3BJvIyHZM1KNBJ5Bmd+qZ6cwZmFgEUmxsXQwSWK4FJ60BuCK9PF4POJeAFb4+95mw== Received: from PH7PR03MB7064.namprd03.prod.outlook.com (2603:10b6:510:2a5::8) by SJ0PR03MB6779.namprd03.prod.outlook.com (2603:10b6:a03:40e::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.13; Thu, 30 Nov 2023 18:46:57 +0000 Received: from PH7PR03MB7064.namprd03.prod.outlook.com ([fe80::9ca4:4c22:a89:9a8]) by PH7PR03MB7064.namprd03.prod.outlook.com ([fe80::9ca4:4c22:a89:9a8%7]) with mapi id 15.20.7068.012; Thu, 30 Nov 2023 18:46:57 +0000 From: Min Li To: richardcochran@gmail.com, lee@kernel.org Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Min Li Subject: [PATCH net-next v6 4/6] ptp: clockmatrix: dco input-to-output delay is 20 FOD cycles + 8ns Date: Thu, 30 Nov 2023 13:46:32 -0500 Message-ID: X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231130184634.22577-1-lnimi@hotmail.com> References: <20231130184634.22577-1-lnimi@hotmail.com> X-TMN: [C0hL0toyEmrxLneOU1BepbnB3dnHexEK] X-ClientProxiedBy: YQBPR0101CA0262.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:68::24) To PH7PR03MB7064.namprd03.prod.outlook.com (2603:10b6:510:2a5::8) X-Microsoft-Original-Message-ID: <20231130184634.22577-4-lnimi@hotmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH7PR03MB7064:EE_|SJ0PR03MB6779:EE_ X-MS-Office365-Filtering-Correlation-Id: 953bb17e-b09a-438c-1b24-08dbf1d4ba83 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YQstSANJ3QnGOJgDcN92X+kXcqPn64noTNxAivSSunn/j062aY9edyEYBoeyjt9bk1Q1jdfzOwdvFvJQQLvR02nkIAyHSSVUJOGm3+yGsy3B996OZqHgdlFNV6VrYJIP5h+6KCo3anX97RHp3Umbmzam7Ndluy5P7TeU8oKPLWiyCsZgU3WK1fvjcTBqAR3jsS62/6zkVcu1azoglT8NhYhk9Pg5FHqYG6bj/9uBFSIPIdFJB4UTiNKACkLXYJDd+Zc2PMQg4rZeRi7hUyYao9Wd0NWweaq+7lbOVqHBgajyDAhnu12WCoFD7+LQX4okonW5unrYeBODi2jnGxmcTKGljpAy8t1jxgPur5OigIEaQpAdyj9vqSDHs2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Lg1/QgOUL+0stHMipN8xAZ2Ldg8Aj4A+MEu+DpdWtSTlh5PldeD/aXLgbg1YuZkNq8IQYVY+MJK8FCe1JF8TxMkEreob1rf9sa45OM6qqCW+NbePNVb/hKpYjAHnRNmiZrc2oFENK6aG4XN3jW7cWXrQ8wRmJl04oZqnPBomh+9JwRTRiy8tIX/iJGZv5if0ullSP8bbrOv832gXv8tZttl8qmbX3QH4narTQuBkE5+6f6PhdBcoZ3vPKkgrjIoY0V+Uy5L5pcr2sALCeFHjol7guAMHpoMXWcMpxZtC7eBGfGFJqBovgW63CcfATvfY+rFTP6xRjRDEAto11lEuJ+vciiNuxiDw0DAghMkmTqMZOi4aJjjP2zCg3tG+/OlXqSwtaL7jmOEBMUXPdSNw== X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-685f7.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 953bb17e-b09a-438c-1b24-08dbf1d4ba83 X-MS-Exchange-CrossTenant-AuthSource: PH7PR03MB7064.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2023 18:46:57.3089 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR03MB6779 X-Patchwork-Delegate: kuba@kernel.org From: Min Li Signed-off-by: Min Li --- drivers/ptp/ptp_clockmatrix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ptp/ptp_clockmatrix.c b/drivers/ptp/ptp_clockmatrix.c index d069b6e451ef..21f3a2c179f5 100644 --- a/drivers/ptp/ptp_clockmatrix.c +++ b/drivers/ptp/ptp_clockmatrix.c @@ -2165,7 +2165,7 @@ static int configure_channel_pll(struct idtcm_channel *channel) /* * Compensate for the PTP DCO input-to-output delay. - * This delay is 18 FOD cycles. + * This delay is 20 FOD cycles + 8ns. */ static u32 idtcm_get_dco_delay(struct idtcm_channel *channel) { @@ -2196,7 +2196,7 @@ static u32 idtcm_get_dco_delay(struct idtcm_channel *channel) fodFreq = (u32)div_u64(m, n); if (fodFreq >= 500000000) - return (u32)div_u64(18 * (u64)NSEC_PER_SEC, fodFreq); + return (u32)div_u64(20 * (u64)NSEC_PER_SEC, fodFreq) + 8; return 0; }