intel-wired-lan.osuosl.org archive mirror
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: Intel Wired LAN <intel-wired-lan@lists.osuosl.org>
Cc: Jacob Keller <jacob.e.keller@intel.com>,
	 Anthony Nguyen <anthony.l.nguyen@intel.com>,
	netdev@vger.kernel.org,
	 Karol Kolacinski <karol.kolacinski@intel.com>
Subject: [Intel-wired-lan] [PATCH 1/8] ice: clear time_sync_en field for E825-C during reprogramming
Date: Mon, 23 Jun 2025 17:29:57 -0700	[thread overview]
Message-ID: <20250623-kk-tspll-improvements-alignment-v1-1-fe9a50620700@intel.com> (raw)
In-Reply-To: <20250623-kk-tspll-improvements-alignment-v1-0-fe9a50620700@intel.com>

When programming the Clock Generation Unit for E285-C hardware, we need
to clear the time_sync_en bit of the DWORD 9 before we set the
frequency.

Co-developed-by: Karol Kolacinski <karol.kolacinski@intel.com>
Signed-off-by: Karol Kolacinski <karol.kolacinski@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_tspll.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/net/ethernet/intel/ice/ice_tspll.c b/drivers/net/ethernet/intel/ice/ice_tspll.c
index 08af4ced50eb877dce5944d87a90d0dcdb49ff2e..5a2ddd3feba2f96d14c817a697423219cadc45e6 100644
--- a/drivers/net/ethernet/intel/ice/ice_tspll.c
+++ b/drivers/net/ethernet/intel/ice/ice_tspll.c
@@ -342,6 +342,14 @@ static int ice_tspll_cfg_e825c(struct ice_hw *hw, enum ice_tspll_freq clk_freq,
 			return err;
 	}
 
+	if (dw9.time_sync_en) {
+		dw9.time_sync_en = 0;
+
+		err = ice_write_cgue_reg(hw, ICE_CGU_R9, dw9.val);
+		if (err)
+			return err;
+	}
+
 	/* Set the frequency */
 	dw9.time_ref_freq_sel = clk_freq;
 
@@ -353,6 +361,7 @@ static int ice_tspll_cfg_e825c(struct ice_hw *hw, enum ice_tspll_freq clk_freq,
 		dw9.time_ref_en = 1;
 		dw9.clk_eref0_en = 0;
 	}
+	dw9.time_sync_en = 1;
 	err = ice_write_cgu_reg(hw, ICE_CGU_R9, dw9.val);
 	if (err)
 		return err;

-- 
2.48.1.397.gec9d649cc640


  reply	other threads:[~2025-06-24  0:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-24  0:29 [Intel-wired-lan] [PATCH 0/8] ice: Separate TSPLL from PTP and cleanup Jacob Keller
2025-06-24  0:29 ` Jacob Keller [this message]
2025-06-24  0:29 ` [Intel-wired-lan] [PATCH 2/8] ice: read TSPLL registers again before reporting status Jacob Keller
2025-06-24  0:29 ` [Intel-wired-lan] [PATCH 3/8] ice: use bitfields instead of unions for CGU regs Jacob Keller
2025-06-24  0:30 ` [Intel-wired-lan] [PATCH 4/8] ice: add multiple TSPLL helpers Jacob Keller
2025-06-24  0:30 ` [Intel-wired-lan] [PATCH 5/8] ice: wait before enabling TSPLL Jacob Keller
2025-06-24  0:30 ` [Intel-wired-lan] [PATCH 6/8] ice: fall back to TCXO on TSPLL lock fail Jacob Keller
2025-06-24  0:30 ` [Intel-wired-lan] [PATCH 7/8] ice: move TSPLL init calls to ice_ptp.c Jacob Keller
2025-06-24  0:30 ` [Intel-wired-lan] [PATCH 8/8] ice: default to TIME_REF instead of TXCO on E825-C Jacob Keller
2025-06-24 16:57 ` [Intel-wired-lan] [PATCH 0/8] ice: Separate TSPLL from PTP and cleanup Jacob Keller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250623-kk-tspll-improvements-alignment-v1-1-fe9a50620700@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=karol.kolacinski@intel.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).