From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7FCF34404F; Wed, 12 Jun 2024 17:14:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 467A440E44; Wed, 12 Jun 2024 17:05:19 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by mails.dpdk.org (Postfix) with ESMTP id 8476642E5D for ; Wed, 12 Jun 2024 17:05:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718204712; x=1749740712; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CHeEaLDH5VjMmxdPh8e2db4iGQdBznDWzNac3RhwYa0=; b=TPsQEqmWuYGEAsNiPF2bn7Hy1KCVRPQF3k3O/c6at5yz7jwZcKDQ2gLT /Q+fiVjvx5G4E9HZwwam4VKPK0qZRx9Sj6dmyWRIpcyoIPEHRFFCs0PqT i8RCrrsrZJBcMM66RmASArBtc/tyQox4DMJtWH9VceBfcc7QwT1lY7zpu t2+Kt64cnuE93D3oieChz/hb14ra+sLtyhpUaIb18hYj99OELBQi63ga1 kT1B6Y32lvZ9fm8dvLCKH6BfGilGkzL+ZFn4qs0dOrjB3oxoC03jHoDmO T4i9rowtHt8FAhKgq1vXX+i57T3hpy5zv/DYvkCrzWdJ1qdA3kR+Wo6wa g==; X-CSE-ConnectionGUID: gYkbWLtyR66V3c1/CFnEkw== X-CSE-MsgGUID: doVYDpxnTXCX7jrQPcTZeg== X-IronPort-AV: E=McAfee;i="6700,10204,11101"; a="32459585" X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="32459585" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2024 08:05:05 -0700 X-CSE-ConnectionGUID: FByxc2WmRV6GgSxtxtF+mw== X-CSE-MsgGUID: fzDTyDMVRKaUEPgOJU3pHg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="39925440" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by orviesa009.jf.intel.com with ESMTP; 12 Jun 2024 08:05:03 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Ian Stokes , bruce.richardson@intel.com, Temerkhanov@dpdk.org, Sergey , Nitka@dpdk.org, Grzegorz Subject: [PATCH v2 064/148] net/ice/base: parse 1PPS GPIO in 1588 function caps Date: Wed, 12 Jun 2024 16:00:58 +0100 Message-ID: <48829bbbf54b7e0998fca3464b332ab5c3403334.1718204528.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: <20240430154014.1026-1-ian.stokes@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Ian Stokes Check for 1PPS GPIO association in 1588 function caps. Remove legacy code related to a workaround setting 1588 capabilities to a fixed value. Signed-off-by: Temerkhanov, Sergey Signed-off-by: Nitka, Grzegorz Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_common.c | 4 +++- drivers/net/ice/base/ice_type.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c index 0062bce2d7..e48085106c 100644 --- a/drivers/net/ice/base/ice_common.c +++ b/drivers/net/ice/base/ice_common.c @@ -2618,7 +2618,7 @@ ice_parse_1588_func_caps(struct ice_hw *hw, struct ice_hw_func_caps *func_p, u32 number = LE32_TO_CPU(cap->number); u8 clk_freq; - ice_debug(hw, ICE_DBG_INIT, "1588 func caps: raw value %x\n", number); + ice_debug(hw, ICE_DBG_INIT, "1588 func caps: raw value %#x\n", number); info->ena = ((number & ICE_TS_FUNC_ENA_M) != 0); func_p->common_cap.ieee_1588 = info->ena; @@ -2628,6 +2628,8 @@ ice_parse_1588_func_caps(struct ice_hw *hw, struct ice_hw_func_caps *func_p, info->tmr_index_owned = ((number & ICE_TS_TMR_IDX_OWND_M) != 0); info->tmr_index_assoc = ((number & ICE_TS_TMR_IDX_ASSOC_M) != 0); + info->gpio_1pps = ((number & ICE_TS_GPIO_1PPS_ASSOC) != 0); + info->clk_src = ((number & ICE_TS_CLK_SRC_M) != 0); clk_freq = (number & ICE_TS_CLK_FREQ_M) >> ICE_TS_CLK_FREQ_S; if (clk_freq < NUM_ICE_TIME_REF_FREQ) { diff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h index cfdae5ffb7..3a4833a0e1 100644 --- a/drivers/net/ice/base/ice_type.h +++ b/drivers/net/ice/base/ice_type.h @@ -732,6 +732,7 @@ struct ice_hw_common_caps { #define ICE_TS_TMR_ENA_M BIT(2) #define ICE_TS_TMR_IDX_OWND_S 4 #define ICE_TS_TMR_IDX_OWND_M BIT(4) +#define ICE_TS_GPIO_1PPS_ASSOC BIT(12) #define ICE_TS_CLK_FREQ_S 16 #define ICE_TS_CLK_FREQ_M MAKEMASK(0x7, ICE_TS_CLK_FREQ_S) #define ICE_TS_CLK_SRC_S 20 @@ -768,6 +769,7 @@ struct ice_ts_func_info { u8 tmr_index_owned : 1; u8 src_tmr_owned : 1; u8 tmr_ena : 1; + u8 gpio_1pps : 1; }; /* Device specific definitions */ -- 2.43.0