From patchwork Mon Aug 15 07:12:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qi Zhang X-Patchwork-Id: 114968 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 534FEA00C3; Mon, 15 Aug 2022 01:04:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EB1C742B96; Mon, 15 Aug 2022 01:03:32 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 92E7442B92 for ; Mon, 15 Aug 2022 01:03:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660518209; x=1692054209; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wXQgQoKkxwiNf2y6YLsUmATUp1FKifWbd3ov2TPw8WU=; b=OqdzhMaT69BZu8Wk5UqZO/uRtldAll1+Ea2nhH01/Izhhxh8pbDkL24F kt+/hiti9hp4bd0A79TzUvAQhWlHQYAphHMEBaEcC6P0lArXW5a2QMnnW pex9hjpDvlPrsScMRseKmH48pri5n1pfQTz3WTczdKHUWMr8UPBCHtZT0 +iq3jiZYDWhdlRvt0pOb5g05ZIdqHPonppums1rxkD/rbsAAoUJEHsOXO r/LtGx5lIAq28fW822MEru1MdjIb6LSFsGcLse1bsG2bu9ru/DN5aOw8c wZf2Wc08+BkiFqUUgBii6IHuYGyTaDNz8/sciUsG7L8V7vbyUsvrdZHxY w==; X-IronPort-AV: E=McAfee;i="6400,9594,10439"; a="289427557" X-IronPort-AV: E=Sophos;i="5.93,237,1654585200"; d="scan'208";a="289427557" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2022 16:03:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,237,1654585200"; d="scan'208";a="934296583" Received: from dpdk-qzhan15-test02.sh.intel.com ([10.67.115.4]) by fmsmga005.fm.intel.com with ESMTP; 14 Aug 2022 16:03:27 -0700 From: Qi Zhang To: qiming.yang@intel.com Cc: dev@dpdk.org, Qi Zhang , Sergey Temerkhanov Subject: [PATCH 11/70] net/ice/base: explicitly name E822 HW-dependent functions Date: Mon, 15 Aug 2022 03:12:07 -0400 Message-Id: <20220815071306.2910599-12-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220815071306.2910599-1-qi.z.zhang@intel.com> References: <20220815071306.2910599-1-qi.z.zhang@intel.com> MIME-Version: 1.0 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 Add the suffix to E822 HW-dependent function names Signed-off-by: Sergey Temerkhanov Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_ptp_hw.c | 23 ++++++++++++----------- drivers/net/ice/base/ice_ptp_hw.h | 7 ++++--- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/drivers/net/ice/base/ice_ptp_hw.c b/drivers/net/ice/base/ice_ptp_hw.c index 76119364e4..23d90b127d 100644 --- a/drivers/net/ice/base/ice_ptp_hw.c +++ b/drivers/net/ice/base/ice_ptp_hw.c @@ -1268,7 +1268,7 @@ ice_ptp_prep_phy_adj_target_e822(struct ice_hw *hw, u32 target_time) } /** - * ice_ptp_read_port_capture - Read a port's local time capture + * ice_ptp_read_port_capture_e822 - Read a port's local time capture * @hw: pointer to HW struct * @port: Port number to read * @tx_ts: on return, the Tx port time capture @@ -1279,7 +1279,8 @@ ice_ptp_prep_phy_adj_target_e822(struct ice_hw *hw, u32 target_time) * Note this has no equivalent for the E810 devices. */ enum ice_status -ice_ptp_read_port_capture(struct ice_hw *hw, u8 port, u64 *tx_ts, u64 *rx_ts) +ice_ptp_read_port_capture_e822(struct ice_hw *hw, u8 port, u64 *tx_ts, + u64 *rx_ts) { enum ice_status status; @@ -1309,7 +1310,7 @@ ice_ptp_read_port_capture(struct ice_hw *hw, u8 port, u64 *tx_ts, u64 *rx_ts) } /** - * ice_ptp_one_port_cmd - Prepare a single PHY port for a timer command + * ice_ptp_one_port_cmd_e822 - Prepare a single PHY port for a timer command * @hw: pointer to HW struct * @port: Port to which cmd has to be sent * @cmd: Command to be sent to the port @@ -1321,8 +1322,8 @@ ice_ptp_read_port_capture(struct ice_hw *hw, u8 port, u64 *tx_ts, u64 *rx_ts) * always handles all external PHYs internally. */ enum ice_status -ice_ptp_one_port_cmd(struct ice_hw *hw, u8 port, enum ice_ptp_tmr_cmd cmd, - bool lock_sbq) +ice_ptp_one_port_cmd_e822(struct ice_hw *hw, u8 port, enum ice_ptp_tmr_cmd cmd, + bool lock_sbq) { enum ice_status status; u32 cmd_val, val; @@ -1416,7 +1417,7 @@ ice_ptp_port_cmd_e822(struct ice_hw *hw, enum ice_ptp_tmr_cmd cmd, for (port = 0; port < ICE_NUM_EXTERNAL_PORTS; port++) { enum ice_status status; - status = ice_ptp_one_port_cmd(hw, port, cmd, lock_sbq); + status = ice_ptp_one_port_cmd_e822(hw, port, cmd, lock_sbq); if (status) return status; } @@ -2318,7 +2319,7 @@ ice_read_phy_and_phc_time_e822(struct ice_hw *hw, u8 port, u64 *phy_time, ice_ptp_src_cmd(hw, READ_TIME); /* Prepare the PHY timer for a READ_TIME capture command */ - status = ice_ptp_one_port_cmd(hw, port, READ_TIME, true); + status = ice_ptp_one_port_cmd_e822(hw, port, READ_TIME, true); if (status) return status; @@ -2331,7 +2332,7 @@ ice_read_phy_and_phc_time_e822(struct ice_hw *hw, u8 port, u64 *phy_time, *phc_time = (u64)lo << 32 | zo; /* Read the captured PHY time from the PHY shadow registers */ - status = ice_ptp_read_port_capture(hw, port, &tx_time, &rx_time); + status = ice_ptp_read_port_capture_e822(hw, port, &tx_time, &rx_time); if (status) return status; @@ -2388,7 +2389,7 @@ static enum ice_status ice_sync_phy_timer_e822(struct ice_hw *hw, u8 port) if (status) goto err_unlock; - status = ice_ptp_one_port_cmd(hw, port, ADJ_TIME, true); + status = ice_ptp_one_port_cmd_e822(hw, port, ADJ_TIME, true); if (status) goto err_unlock; @@ -2513,7 +2514,7 @@ ice_start_phy_timer_e822(struct ice_hw *hw, u8 port, bool bypass) if (status) return status; - status = ice_ptp_one_port_cmd(hw, port, INIT_INCVAL, true); + status = ice_ptp_one_port_cmd_e822(hw, port, INIT_INCVAL, true); if (status) return status; @@ -2538,7 +2539,7 @@ ice_start_phy_timer_e822(struct ice_hw *hw, u8 port, bool bypass) if (status) return status; - status = ice_ptp_one_port_cmd(hw, port, INIT_INCVAL, true); + status = ice_ptp_one_port_cmd_e822(hw, port, INIT_INCVAL, true); if (status) return status; diff --git a/drivers/net/ice/base/ice_ptp_hw.h b/drivers/net/ice/base/ice_ptp_hw.h index d27815fd94..9cc3436aa8 100644 --- a/drivers/net/ice/base/ice_ptp_hw.h +++ b/drivers/net/ice/base/ice_ptp_hw.h @@ -157,10 +157,11 @@ ice_ptp_prep_port_adj_e822(struct ice_hw *hw, u8 port, s64 time, enum ice_status ice_ptp_read_phy_incval_e822(struct ice_hw *hw, u8 port, u64 *incval); enum ice_status -ice_ptp_read_port_capture(struct ice_hw *hw, u8 port, u64 *tx_ts, u64 *rx_ts); +ice_ptp_read_port_capture_e822(struct ice_hw *hw, u8 port, + u64 *tx_ts, u64 *rx_ts); enum ice_status -ice_ptp_one_port_cmd(struct ice_hw *hw, u8 port, enum ice_ptp_tmr_cmd cmd, - bool lock_sbq); +ice_ptp_one_port_cmd_e822(struct ice_hw *hw, u8 port, + enum ice_ptp_tmr_cmd cmd, bool lock_sbq); enum ice_status ice_cfg_cgu_pll_e822(struct ice_hw *hw, enum ice_time_ref_freq clk_freq, enum ice_clk_src clk_src);