Skip to content

Commit 912ce81

Browse files
committed
ice: implement dpll interface to control cgu
Control over clock generation unit is required for further development of Synchronous Ethernet feature. Interface provides ability to obtain current state of a dpll, its sources and outputs which are pins, and allows their configuration. v9->v10: - add support for DPLL_MODE_FREERUN mode - use DPLL_LOCK_STATUS, remove ICE_DPLL_LOCK_STATUS - fix mutex locking scheme - implement callback phase_shift_get() - notify on phase shift changes - implement callbacks phase_adjust_get(), phase_adjust_set() v8->v9: - drop pointless 0 assignement - ice_dpll_init(..) returns void instead of int - fix context description of the functions - fix ice_dpll_init(..) traces - fix use package_label instead pf board_label for rclk pin - be consistent on cgu presence naming - remove indent in ice_dpll_deinit(..) - remove unused struct field lock_err_num - fix kworker resched behavior - remove debug log from ice_dpll_deinit_worker(..) - reorder ice internal functions - release resources directly on error path - remove redundant NULL checks when releasing resources - do not assign NULL to pointers after releasing resources - simplify variable assignement - fix 'int ret;' declarations across the ice_dpll.c - remove leftover ice_dpll_find(..) - get pf pointer from dpll_priv without type cast - improve error reporting - fix documentation - fix ice_dpll_update_state(..) flow - fix return in case out of range prio set Co-developed-by: Milena Olech <milena.olech@intel.com> Signed-off-by: Milena Olech <milena.olech@intel.com> Co-developed-by: Michal Michalik <michal.michalik@intel.com> Signed-off-by: Michal Michalik <michal.michalik@intel.com> Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
1 parent 6056560 commit 912ce81

6 files changed

Lines changed: 2386 additions & 1 deletion

File tree

drivers/net/ethernet/intel/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ config ICE
284284
select DIMLIB
285285
select NET_DEVLINK
286286
select PLDMFW
287+
select DPLL
287288
help
288289
This driver supports Intel(R) Ethernet Connection E800 Series of
289290
devices. For more information on how to identify your adapter, go

drivers/net/ethernet/intel/ice/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ ice-y := ice_main.o \
3434
ice_lag.o \
3535
ice_ethtool.o \
3636
ice_repr.o \
37-
ice_tc_lib.o
37+
ice_tc_lib.o \
38+
ice_dpll.o
3839
ice-$(CONFIG_PCI_IOV) += \
3940
ice_sriov.o \
4041
ice_virtchnl.o \

drivers/net/ethernet/intel/ice/ice.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
#include "ice_vsi_vlan_ops.h"
7777
#include "ice_gnss.h"
7878
#include "ice_irq.h"
79+
#include "ice_dpll.h"
7980

8081
#define ICE_BAR0 0
8182
#define ICE_REQ_DESC_MULTIPLE 32
@@ -198,6 +199,7 @@
198199
enum ice_feature {
199200
ICE_F_DSCP,
200201
ICE_F_PTP_EXTTS,
202+
ICE_F_PHY_RCLK,
201203
ICE_F_SMA_CTRL,
202204
ICE_F_CGU,
203205
ICE_F_GNSS,
@@ -506,6 +508,7 @@ enum ice_pf_flags {
506508
ICE_FLAG_UNPLUG_AUX_DEV,
507509
ICE_FLAG_MTU_CHANGED,
508510
ICE_FLAG_GNSS, /* GNSS successfully initialized */
511+
ICE_FLAG_DPLL, /* SyncE/PTP dplls initialized */
509512
ICE_PF_FLAGS_NBITS /* must be last */
510513
};
511514

@@ -635,6 +638,7 @@ struct ice_pf {
635638
#define ICE_VF_AGG_NODE_ID_START 65
636639
#define ICE_MAX_VF_AGG_NODES 32
637640
struct ice_agg_node vf_agg_node[ICE_MAX_VF_AGG_NODES];
641+
struct ice_dplls dplls;
638642
};
639643

640644
struct ice_netdev_priv {

0 commit comments

Comments
 (0)