From patchwork Fri Sep 16 13:14:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karol Kolacinski X-Patchwork-Id: 1678687 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=YS0fvg/N; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MTZL91Jb7z1ync for ; Fri, 16 Sep 2022 23:14:57 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 74AF16120B; Fri, 16 Sep 2022 13:14:55 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 74AF16120B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1663334095; bh=dEOSnaK1HNELbd/Uf0ySjtQmfOVP7IRx6RhFQuzamOc=; h=From:To:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Cc:From; b=YS0fvg/NvcFsf29TjTZrBMLPPVd4s+deqRldtUKqS75F1aVeZrvviQFIluUNOiRhz OjzelukbJ9rMcCxhpxEHVAg93io7irZbo+y2Vha2Kw0mN51YHmbUjojg5gaxhisUI9 bCcpFlhcc/ASrmWBer7B99jtLKF3QUSH5txZ0OYmJ5/lxuS3vSnR8OQffOjijRvYkd DGZz85CDSdnJkkA+khxvEDMSQDaBaoX24c8N6tCrltSP3s1/LvwEBcPPHZu4D7e92o ByhPsoD1vlBzyUOMi/cBuBiRN9a7Mmm4p1NNgJXC1y27RDimykjwmyBaYgOOhpKWTu A1KplkZuV/w9g== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id m_frn8QBLlGV; Fri, 16 Sep 2022 13:14:54 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 62C9661352; Fri, 16 Sep 2022 13:14:54 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 62C9661352 X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 52D111BF2C0 for ; Fri, 16 Sep 2022 13:14:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 2E3A6842F6 for ; Fri, 16 Sep 2022 13:14:49 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 2E3A6842F6 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iEfbs5iuZOt7 for ; Fri, 16 Sep 2022 13:14:45 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 142EB842D6 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by smtp1.osuosl.org (Postfix) with ESMTPS id 142EB842D6 for ; Fri, 16 Sep 2022 13:14:44 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6500,9779,10472"; a="297711400" X-IronPort-AV: E=Sophos;i="5.93,320,1654585200"; d="scan'208";a="297711400" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2022 06:14:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,320,1654585200"; d="scan'208";a="648254785" Received: from kkolacin-desk1.igk.intel.com ([172.22.229.172]) by orsmga008.jf.intel.com with ESMTP; 16 Sep 2022 06:14:43 -0700 From: Karol Kolacinski To: intel-wired-lan@lists.osuosl.org Date: Fri, 16 Sep 2022 15:14:39 +0200 Message-Id: <20220916131440.566617-1-karol.kolacinski@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Organization: Intel Technology Poland sp. z o.o. - ul. Slowackiego 173, 80-298 Gdansk - KRS 101882 - NIP 957-07-52-316 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663334085; x=1694870085; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=EP1t/mVLBhTFzyJCs5rvrchhrKM37OHMO8zvS7Pv5Rw=; b=PtKamqYdS9gHYhjSuyJHPibakWwUk8nPNnnwPj5zS4XgV8XNKDLVaLBp 5k6FmMvZ/h3E10ZmcTBWUpgbKjBmNskup8V94gfWU6i2Yxp5IsEJ6UOBX fqHFp8JwUy4KDiEi+W0CSA6CAlLhMwvmIyiwbSIAQ/NDTsFJbHPiQz8zZ +eA2J3NeFSl7clgRQW8PG9qEgm1fNfqaJOOtAZ8XHJ+bmdF2Jcv9WNEyz 5EJR8etfBQCWn+nf+iVLnkv5CXz1251JcbzWIKkv4yj/4grWHKYSaiZBG KP0pDsJNIJ6iJwcsGoIO+hrcRqYm2817LiOyVXI42+IoGYUx0+PoZl+md g==; X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=PtKamqYd Subject: [Intel-wired-lan] [PATCH net-next 1/2] ice: Add GPIO pin support for E823 products X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Karol Kolacinski Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" Add GPIO pin setup for E823, which is only 1PPS input and output. Signed-off-by: Karol Kolacinski --- drivers/net/ethernet/intel/ice/ice_common.c | 25 ++++++++ drivers/net/ethernet/intel/ice/ice_common.h | 1 + drivers/net/ethernet/intel/ice/ice_ptp.c | 64 +++++++++++++++++++++ 3 files changed, 90 insertions(+) diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c index 2a4b68ef7d55..11cc17372b74 100644 --- a/drivers/net/ethernet/intel/ice/ice_common.c +++ b/drivers/net/ethernet/intel/ice/ice_common.c @@ -193,6 +193,31 @@ bool ice_is_e810t(struct ice_hw *hw) return false; } +/** + * ice_is_e823 + * @hw: pointer to the hardware structure + * + * returns true if the device is E823-L or E823-C based, false if not. + */ +bool ice_is_e823(struct ice_hw *hw) +{ + switch (hw->device_id) { + case ICE_DEV_ID_E823L_BACKPLANE: + case ICE_DEV_ID_E823L_SFP: + case ICE_DEV_ID_E823L_10G_BASE_T: + case ICE_DEV_ID_E823L_1GBE: + case ICE_DEV_ID_E823L_QSFP: + case ICE_DEV_ID_E823C_BACKPLANE: + case ICE_DEV_ID_E823C_QSFP: + case ICE_DEV_ID_E823C_SFP: + case ICE_DEV_ID_E823C_10G_BASE_T: + case ICE_DEV_ID_E823C_SGMII: + return true; + default: + return false; + } +} + /** * ice_clear_pf_cfg - Clear PF configuration * @hw: pointer to the hardware structure diff --git a/drivers/net/ethernet/intel/ice/ice_common.h b/drivers/net/ethernet/intel/ice/ice_common.h index f339bdc48062..858b89a39cb6 100644 --- a/drivers/net/ethernet/intel/ice/ice_common.h +++ b/drivers/net/ethernet/intel/ice/ice_common.h @@ -198,6 +198,7 @@ void ice_stat_update32(struct ice_hw *hw, u32 reg, bool prev_stat_loaded, u64 *prev_stat, u64 *cur_stat); bool ice_is_e810t(struct ice_hw *hw); +bool ice_is_e823(struct ice_hw *hw); int ice_sched_query_elem(struct ice_hw *hw, u32 node_teid, struct ice_aqc_txsched_elem_data *buf); diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c index 011b727ab190..408beddc1210 100644 --- a/drivers/net/ethernet/intel/ice/ice_ptp.c +++ b/drivers/net/ethernet/intel/ice/ice_ptp.c @@ -1788,6 +1788,38 @@ ice_ptp_gpio_enable_e810(struct ptp_clock_info *info, return err; } +/** + * ice_ptp_gpio_enable_e823 - Enable/disable ancillary features of PHC + * @info: the driver's PTP info structure + * @rq: The requested feature to change + * @on: Enable/disable flag + */ +static int ice_ptp_gpio_enable_e823(struct ptp_clock_info *info, + struct ptp_clock_request *rq, int on) +{ + struct ice_pf *pf = ptp_info_to_pf(info); + struct ice_perout_channel clk_cfg = {0}; + int err; + + switch (rq->type) { + case PTP_CLK_REQ_PPS: + clk_cfg.gpio_pin = PPS_PIN_INDEX; + clk_cfg.period = NSEC_PER_SEC; + clk_cfg.ena = !!on; + + err = ice_ptp_cfg_clkout(pf, PPS_CLK_GEN_CHAN, &clk_cfg, true); + break; + case PTP_CLK_REQ_EXTTS: + err = ice_ptp_cfg_extts(pf, !!on, rq->extts.index, + TIME_SYNC_PIN_INDEX, rq->extts.flags); + break; + default: + return -EOPNOTSUPP; + } + + return err; +} + /** * ice_ptp_gettimex64 - Get the time of the clock * @info: the driver's PTP info structure @@ -2239,6 +2271,19 @@ ice_ptp_setup_pins_e810(struct ice_pf *pf, struct ptp_clock_info *info) } } +/** + * ice_ptp_setup_pins_e823 - Setup PTP pins in sysfs + * @pf: pointer to the PF instance + * @info: PTP clock capabilities + */ +static void +ice_ptp_setup_pins_e823(struct ice_pf *pf, struct ptp_clock_info *info) +{ + info->pps = 1; + info->n_per_out = 0; + info->n_ext_ts = 1; +} + /** * ice_ptp_set_funcs_e822 - Set specialized functions for E822 support * @pf: Board private structure @@ -2276,6 +2321,23 @@ ice_ptp_set_funcs_e810(struct ice_pf *pf, struct ptp_clock_info *info) ice_ptp_setup_pins_e810(pf, info); } +/** + * ice_ptp_set_funcs_e823 - Set specialized functions for E823 support + * @pf: Board private structure + * @info: PTP info to fill + * + * Assign functions to the PTP capabiltiies structure for E823 devices. + * Functions which operate across all device families should be set directly + * in ice_ptp_set_caps. Only add functions here which are distinct for e823 + * devices. + */ +static void +ice_ptp_set_funcs_e823(struct ice_pf *pf, struct ptp_clock_info *info) +{ + info->enable = ice_ptp_gpio_enable_e823; + ice_ptp_setup_pins_e823(pf, info); +} + /** * ice_ptp_set_caps - Set PTP capabilities * @pf: Board private structure @@ -2296,6 +2358,8 @@ static void ice_ptp_set_caps(struct ice_pf *pf) if (ice_is_e810(&pf->hw)) ice_ptp_set_funcs_e810(pf, info); + else if (ice_is_e823(&pf->hw)) + ice_ptp_set_funcs_e823(pf, info); else ice_ptp_set_funcs_e822(pf, info); } From patchwork Fri Sep 16 13:14:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karol Kolacinski X-Patchwork-Id: 1678686 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=S1qF3tD3; dkim-atps=neutral Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MTZL473vDz1ync for ; Fri, 16 Sep 2022 23:14:52 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 330CD41C72; Fri, 16 Sep 2022 13:14:51 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 330CD41C72 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1663334091; bh=6ZJpnV9l8DBVd/f9Q+Rtz7jsdupJgQiqKbUuS3WLEP0=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=S1qF3tD3D8UkED/BOc2PzfRgcuyCWVXGXQASp2VQHMEmrUFj6IlIxr0UrTedHQDV9 ppET1OgSIUaTWwDfvAbJBuUvMD5VtUblq8Jwi+6gjetuAK7IhCX8nk/Y/L/av0rq0h BV4SZAXlXSixQ5pzbkAkgWITg4Af2PjEs2YuqMUJp0DgS7eNFVc0EhV3p2pNC0KTz7 QuLIk5jilrftQdgBCMwFPT8Ax6VdlvzzhbBQ+n4TWripRomKCXKPbnvdfO3LG+Hb4o 5w56fHVRSgpWkHVcO62UQyIwo+RPWeembbWQJJNVCVxhk4GRm2qCvARvULg3qCRTEM yRGkSzp9He6lg== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ack4ekrbRKid; Fri, 16 Sep 2022 13:14:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id C927541C8F; Fri, 16 Sep 2022 13:14:49 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org C927541C8F X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id EFE331BF2C0 for ; Fri, 16 Sep 2022 13:14:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id D7960842FF for ; Fri, 16 Sep 2022 13:14:47 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org D7960842FF X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QBOCL1M-3m5o for ; Fri, 16 Sep 2022 13:14:47 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 0524F842F6 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by smtp1.osuosl.org (Postfix) with ESMTPS id 0524F842F6 for ; Fri, 16 Sep 2022 13:14:46 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6500,9779,10472"; a="297711405" X-IronPort-AV: E=Sophos;i="5.93,320,1654585200"; d="scan'208";a="297711405" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2022 06:14:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,320,1654585200"; d="scan'208";a="648254792" Received: from kkolacin-desk1.igk.intel.com ([172.22.229.172]) by orsmga008.jf.intel.com with ESMTP; 16 Sep 2022 06:14:45 -0700 From: Karol Kolacinski To: intel-wired-lan@lists.osuosl.org Date: Fri, 16 Sep 2022 15:14:40 +0200 Message-Id: <20220916131440.566617-2-karol.kolacinski@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220916131440.566617-1-karol.kolacinski@intel.com> References: <20220916131440.566617-1-karol.kolacinski@intel.com> MIME-Version: 1.0 Organization: Intel Technology Poland sp. z o.o. - ul. Slowackiego 173, 80-298 Gdansk - KRS 101882 - NIP 957-07-52-316 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663334087; x=1694870087; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hx87ib+vxAk9lkQFZtJ7Bkxj9cYcDwRSu2kSmW1uSe8=; b=BmzkPl4XUlzoas1/2C9Zqx1xBWEv2uNoP0Xz5Bne6XCfLBcGrEkOGPCk 6QXZ5wFMMFgxNOf3tz2JLJSUMG/3w2LG7wJZu255Q3F/xzEx3fgPSaRK5 tfshD8eM65Ch+rjIeP2OPatT/47mrGwHJXFwsoiI8ywDmuzddYuFNmkjg koRBezLNZcPwn69P4lM8FdcreRKXRh2B6adK3ZdCzKC6P1QjO5Jsk5svX 9WXD6N8QpDWzyRfUuhejcuAfpVQuC3rJ9v+2LfGZi1bOz7dGGdZZ72H5j d3JT/Q5mUogJCr7objVz709Eik0QowqG0jQxR3V+kOuzzMiSdI+QZKus9 w==; X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=BmzkPl4X Subject: [Intel-wired-lan] [PATCH net-next 2/2] ice: Add crosstimestamping on E823 devices X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Karol Kolacinski Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" E823 devices on supported platforms can generate a cross timestamp between the platform ART and the device time. This process allows for very precise measurement of the difference between the PTP hardware clock and the platform time. This is only supported if we know the TSC frequency relative to ART, so we do not enable this unless the boot CPU has a known TSC frequency (as required by convert_art_ns_to_tsc). Signed-off-by: Karol Kolacinski --- drivers/net/ethernet/intel/ice/ice_ptp.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c index 408beddc1210..0b37e3d1ef68 100644 --- a/drivers/net/ethernet/intel/ice/ice_ptp.c +++ b/drivers/net/ethernet/intel/ice/ice_ptp.c @@ -2036,7 +2036,7 @@ ice_ptp_get_syncdevicetime(ktime_t *device, } /** - * ice_ptp_getcrosststamp_e822 - Capture a device cross timestamp + * ice_ptp_getcrosststamp_generic - Capture a device cross timestamp * @info: the driver's PTP info structure * @cts: The memory to fill the cross timestamp info * @@ -2044,15 +2044,15 @@ ice_ptp_get_syncdevicetime(ktime_t *device, * clock. Fill the cross timestamp information and report it back to the * caller. * - * This is only valid for E822 devices which have support for generating the - * cross timestamp via PCIe PTM. + * This is only valid for E822 and E823 devices which have support for + * generating the cross timestamp via PCIe PTM. * * In order to correctly correlate the ART timestamp back to the TSC time, the * CPU must have X86_FEATURE_TSC_KNOWN_FREQ. */ static int -ice_ptp_getcrosststamp_e822(struct ptp_clock_info *info, - struct system_device_crosststamp *cts) +ice_ptp_getcrosststamp_generic(struct ptp_clock_info *info, + struct system_device_crosststamp *cts) { struct ice_pf *pf = ptp_info_to_pf(info); @@ -2300,7 +2300,7 @@ ice_ptp_set_funcs_e822(struct ice_pf *pf, struct ptp_clock_info *info) #ifdef CONFIG_ICE_HWTS if (boot_cpu_has(X86_FEATURE_ART) && boot_cpu_has(X86_FEATURE_TSC_KNOWN_FREQ)) - info->getcrosststamp = ice_ptp_getcrosststamp_e822; + info->getcrosststamp = ice_ptp_getcrosststamp_generic; #endif /* CONFIG_ICE_HWTS */ } @@ -2334,6 +2334,12 @@ ice_ptp_set_funcs_e810(struct ice_pf *pf, struct ptp_clock_info *info) static void ice_ptp_set_funcs_e823(struct ice_pf *pf, struct ptp_clock_info *info) { +#ifdef CONFIG_ICE_HWTS + if (boot_cpu_has(X86_FEATURE_ART) && + boot_cpu_has(X86_FEATURE_TSC_KNOWN_FREQ)) + info->getcrosststamp = ice_ptp_getcrosststamp_generic; +#endif /* CONFIG_ICE_HWTS */ + info->enable = ice_ptp_gpio_enable_e823; ice_ptp_setup_pins_e823(pf, info); }