diff mbox series

[net-next,v7,3/5] ptp: clockmatrix: dco input-to-output delay is 20 FOD cycles + 8ns

Message ID LV3P220MB12024CB984967E4AC05A1E13A0192@LV3P220MB1202.NAMP220.PROD.OUTLOOK.COM (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series ptp: clockmatrix: support 32-bit address space | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 926 this patch: 926
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 2 of 2 maintainers
netdev/build_clang success Errors and warnings before: 937 this patch: 937
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 937 this patch: 937
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 16 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-05-02--06-00 (tests: 996)

Commit Message

Min Li May 1, 2024, 4:03 p.m. UTC
From: Min Li <min.li.xe@renesas.com>

Set dco input-to-output delay is 20 FOD cycles + 8ns

Signed-off-by: Min Li <min.li.xe@renesas.com>
---
 drivers/ptp/ptp_clockmatrix.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Horatiu Vultur May 2, 2024, 6:49 a.m. UTC | #1
The 05/01/2024 12:03, Min Li wrote:

Hi Min Li,

> 
> From: Min Li <min.li.xe@renesas.com>
> 
> Set dco input-to-output delay is 20 FOD cycles + 8ns

Can you explain why you are doing this change in the commit message?
Is this a fix or just improvement?

> 
> Signed-off-by: Min Li <min.li.xe@renesas.com>
> ---
>  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;
>  }
> --
> 2.39.2
> 
>
Min Li May 3, 2024, 2:04 p.m. UTC | #2
> 
> Can you explain why you are doing this change in the commit message?
> Is this a fix or just improvement?
> 

This is a fix but the first patch of the series is an improvement. But they have
code dependency so I am submitting them together to avoid the hassle

Min
diff mbox series

Patch

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;
 }