Re: [Intel-wired-lan] [PATCH v4 01/15] ice: move TSPLL functions to a separate file

2025-05-22 Thread Rinitha, SX
> -Original Message-
> From: Intel-wired-lan  On Behalf Of Jacob 
> Keller
> Sent: 02 May 2025 04:24
> To: Intel Wired LAN ; Nguyen, Anthony L 
> ; netdev 
> Cc: Keller, Jacob E ; Kubiak, Michal 
> ; Loktionov, Aleksandr 
> ; Kolacinski, Karol 
> ; Kitszel, > Przemyslaw 
> ; Olech, Milena ; Paul 
> Menzel 
> Subject: [Intel-wired-lan] [PATCH v4 01/15] ice: move TSPLL functions to a 
> separate file
>
> From: Karol Kolacinski 
>
> Collect TSPLL related functions and definitions and move them to
a separate file to have all TSPLL functionality in one place.
>
> Move CGU related functions and definitions to ice_common.*
>
> Reviewed-by: Michal Kubiak 
> Reviewed-by: Milena Olech 
> Signed-off-by: Karol Kolacinski 
> ---
> drivers/net/ethernet/intel/ice/ice.h|   1 +
> drivers/net/ethernet/intel/ice/ice_cgu_regs.h   | 181 ---
> drivers/net/ethernet/intel/ice/ice_common.h | 176 +++
> drivers/net/ethernet/intel/ice/ice_ptp_consts.h | 161 --
> drivers/net/ethernet/intel/ice/ice_ptp_hw.h |  43 --
> drivers/net/ethernet/intel/ice/ice_tspll.h  |  46 ++
> drivers/net/ethernet/intel/ice/ice_common.c |  61 +++
> drivers/net/ethernet/intel/ice/ice_ptp.c|   1 -
> drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 542 
> drivers/net/ethernet/intel/ice/ice_tspll.c  | 646 
> drivers/net/ethernet/intel/ice/Makefile |   2 +-
> 11 files changed, 931 insertions(+), 929 deletions(-)
>

Tested-by: Rinitha S  (A Contingent worker at Intel)


[Intel-wired-lan] [PATCH v4 01/15] ice: move TSPLL functions to a separate file

2025-05-01 Thread Jacob Keller
From: Karol Kolacinski 

Collect TSPLL related functions and definitions and move them to
a separate file to have all TSPLL functionality in one place.

Move CGU related functions and definitions to ice_common.*

Reviewed-by: Michal Kubiak 
Reviewed-by: Milena Olech 
Signed-off-by: Karol Kolacinski 
---
 drivers/net/ethernet/intel/ice/ice.h|   1 +
 drivers/net/ethernet/intel/ice/ice_cgu_regs.h   | 181 ---
 drivers/net/ethernet/intel/ice/ice_common.h | 176 +++
 drivers/net/ethernet/intel/ice/ice_ptp_consts.h | 161 --
 drivers/net/ethernet/intel/ice/ice_ptp_hw.h |  43 --
 drivers/net/ethernet/intel/ice/ice_tspll.h  |  46 ++
 drivers/net/ethernet/intel/ice/ice_common.c |  61 +++
 drivers/net/ethernet/intel/ice/ice_ptp.c|   1 -
 drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 542 
 drivers/net/ethernet/intel/ice/ice_tspll.c  | 646 
 drivers/net/ethernet/intel/ice/Makefile |   2 +-
 11 files changed, 931 insertions(+), 929 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/ice.h 
b/drivers/net/ethernet/intel/ice/ice.h
index 
0693707ceabf2cf185f31eb079ff329a0469d4ee..fe5db9c5fb5515fcd2b96444da28140ca5671374
 100644
--- a/drivers/net/ethernet/intel/ice/ice.h
+++ b/drivers/net/ethernet/intel/ice/ice.h
@@ -67,6 +67,7 @@
 #include "ice_sriov.h"
 #include "ice_vf_mbx.h"
 #include "ice_ptp.h"
+#include "ice_tspll.h"
 #include "ice_fdir.h"
 #include "ice_xsk.h"
 #include "ice_arfs.h"
diff --git a/drivers/net/ethernet/intel/ice/ice_cgu_regs.h 
b/drivers/net/ethernet/intel/ice/ice_cgu_regs.h
deleted file mode 100644
index 
10d9d74f35455a61d6f75238bf6703777881..
--- a/drivers/net/ethernet/intel/ice/ice_cgu_regs.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright (C) 2018-2021, Intel Corporation. */
-
-#ifndef _ICE_CGU_REGS_H_
-#define _ICE_CGU_REGS_H_
-
-#define NAC_CGU_DWORD9 0x24
-union nac_cgu_dword9 {
-   struct {
-   u32 time_ref_freq_sel : 3;
-   u32 clk_eref1_en : 1;
-   u32 clk_eref0_en : 1;
-   u32 time_ref_en : 1;
-   u32 time_sync_en : 1;
-   u32 one_pps_out_en : 1;
-   u32 clk_ref_synce_en : 1;
-   u32 clk_synce1_en : 1;
-   u32 clk_synce0_en : 1;
-   u32 net_clk_ref1_en : 1;
-   u32 net_clk_ref0_en : 1;
-   u32 clk_synce1_amp : 2;
-   u32 misc6 : 1;
-   u32 clk_synce0_amp : 2;
-   u32 one_pps_out_amp : 2;
-   u32 misc24 : 12;
-   };
-   u32 val;
-};
-
-#define NAC_CGU_DWORD16_E825C 0x40
-union nac_cgu_dword16_e825c {
-   struct {
-   u32 synce_remndr : 6;
-   u32 synce_phlmt_en : 1;
-   u32 misc13 : 17;
-   u32 tspll_ck_refclkfreq : 8;
-   };
-   u32 val;
-};
-
-#define NAC_CGU_DWORD19 0x4c
-union nac_cgu_dword19 {
-   struct {
-   u32 tspll_fbdiv_intgr : 8;
-   u32 fdpll_ulck_thr : 5;
-   u32 misc15 : 3;
-   u32 tspll_ndivratio : 4;
-   u32 tspll_iref_ndivratio : 3;
-   u32 misc19 : 1;
-   u32 japll_ndivratio : 4;
-   u32 japll_iref_ndivratio : 3;
-   u32 misc27 : 1;
-   };
-   u32 val;
-};
-
-#define NAC_CGU_DWORD22 0x58
-union nac_cgu_dword22 {
-   struct {
-   u32 fdpll_frac_div_out_nc : 2;
-   u32 fdpll_lock_int_for : 1;
-   u32 synce_hdov_int_for : 1;
-   u32 synce_lock_int_for : 1;
-   u32 fdpll_phlead_slip_nc : 1;
-   u32 fdpll_acc1_ovfl_nc : 1;
-   u32 fdpll_acc2_ovfl_nc : 1;
-   u32 synce_status_nc : 6;
-   u32 fdpll_acc1f_ovfl : 1;
-   u32 misc18 : 1;
-   u32 fdpllclk_div : 4;
-   u32 time1588clk_div : 4;
-   u32 synceclk_div : 4;
-   u32 synceclk_sel_div2 : 1;
-   u32 fdpllclk_sel_div2 : 1;
-   u32 time1588clk_sel_div2 : 1;
-   u32 misc3 : 1;
-   };
-   u32 val;
-};
-
-#define NAC_CGU_DWORD23_E825C 0x5C
-union nac_cgu_dword23_e825c {
-   struct {
-   u32 cgupll_fbdiv_intgr : 10;
-   u32 ux56pll_fbdiv_intgr : 10;
-   u32 misc20 : 4;
-   u32 ts_pll_enable : 1;
-   u32 time_sync_tspll_align_sel : 1;
-   u32 ext_synce_sel : 1;
-   u32 ref1588_ck_div : 4;
-   u32 time_ref_sel : 1;
-
-   };
-   u32 val;
-};
-
-#define NAC_CGU_DWORD24 0x60
-union nac_cgu_dword24 {
-   struct {
-   u32 tspll_fbdiv_frac : 22;
-   u32 misc20 : 2;
-   u32 ts_pll_enable : 1;
-   u32 time_sync_tspll_align_sel : 1;
-   u32 ext_synce_sel : 1;
-   u32 ref1588_ck_div : 4;