From patchwork Wed Feb 21 15:24:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Diogo Ivo X-Patchwork-Id: 13565713 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 36D5DC5478B for ; Wed, 21 Feb 2024 15:25:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Y9N7+LQzbvFFTbLT1APiRUOD3+WS4qFjyof05CLmgxU=; b=xUU3K9LAbz+sBf DOWGib6O52CU/o7hh/3aTnoG4f9QHpnyT2IpU84gWbCQPLb9QVkYtTwPC9fPxVuxyRGAMSM//QAmI 1YVFeQI5JpPVrsX2vOtiHdV0PNXOMbE0pm9wry/ypBq9jJ9UdvM8Qy1/oqQpmxqOOUbU1FhooC4iZ 2zJsVcBuAcrEMHY8wfuXP5KdzZjXJtYheqh/MRxWKeDsTWc3jFp98DXEQkMRjhR128MWGltGLJIje Xit2c65FbfHMTPJYf6BoHDoSWmBOfQHqnSU6gOZw3q7FeKYNBDHwfmuZ0KBrj5q4w0y50pnZAGDAH lLXbvq73R7HjXTlqLVpw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcoT2-00000001Slj-2jQB; Wed, 21 Feb 2024 15:25:04 +0000 Received: from mta-64-225.siemens.flowmailer.net ([185.136.64.225]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcoSa-00000001SSH-3W6s for linux-arm-kernel@lists.infradead.org; Wed, 21 Feb 2024 15:24:40 +0000 Received: by mta-64-225.siemens.flowmailer.net with ESMTPSA id 202402211524314c3b6fb29343c4cb89 for ; Wed, 21 Feb 2024 16:24:31 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=diogo.ivo@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=FXKziFoTOJtYIGfb44L1UOkVBGYenDwVFISQu0Q4lAs=; b=LgWU64L4xOwuFVGtZG5gglaCHFTvtACAMlsG1TTCE1iMzEbuT0qWR9Fqx03DLg2TCN24p7 TZqEPuA/aWdOOQq11zwPe/ssqlyhtoICTzKYr0Q4eebyQb58NzcR7ExKgdgaGndbNmPKW9Z+ 0KuNvC7cRji1s21TyqWDoTZ6iOoYI=; From: Diogo Ivo To: danishanwar@ti.com, rogerq@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, andrew@lunn.ch, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org Cc: Diogo Ivo , jan.kiszka@siemens.com Subject: [PATCH net-next v3 05/10] net: ti: icssg-prueth: Add SR1.0-specific description bits Date: Wed, 21 Feb 2024 15:24:11 +0000 Message-ID: <20240221152421.112324-6-diogo.ivo@siemens.com> In-Reply-To: <20240221152421.112324-1-diogo.ivo@siemens.com> References: <20240221152421.112324-1-diogo.ivo@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1320519:519-21489:flowmailer X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240221_072437_552036_928BC5E1 X-CRM114-Status: UNSURE ( 9.53 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a field to distinguish between SR1.0 and SR2.0 in the driver as well as the necessary structures to program SR1.0. Based on the work of Roger Quadros in TI's 5.10 SDK [1]. [1]: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/?h=ti-linux-5.10.y Co-developed-by: Jan Kiszka Signed-off-by: Jan Kiszka Signed-off-by: Diogo Ivo Reviewed-by: Roger Quadros --- drivers/net/ethernet/ti/icssg/icssg_prueth.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/net/ethernet/ti/icssg/icssg_prueth.h b/drivers/net/ethernet/ti/icssg/icssg_prueth.h index 5d792e9bade0..a8192e408941 100644 --- a/drivers/net/ethernet/ti/icssg/icssg_prueth.h +++ b/drivers/net/ethernet/ti/icssg/icssg_prueth.h @@ -129,6 +129,7 @@ struct prueth_rx_chn { /* data for each emac port */ struct prueth_emac { + bool is_sr1; bool fw_running; struct prueth *prueth; struct net_device *ndev; @@ -157,6 +158,10 @@ struct prueth_emac { int rx_flow_id_base; int tx_ch_num; + /* SR1.0 Management channel */ + struct prueth_rx_chn rx_mgm_chn; + int rx_mgm_flow_id_base; + spinlock_t lock; /* serialize access */ /* TX HW Timestamping */ @@ -251,6 +256,13 @@ struct emac_tx_ts_response { u32 hi_ts; }; +struct emac_tx_ts_response_sr1 { + u32 lo_ts; + u32 hi_ts; + u32 reserved; + u32 cookie; +}; + /* get PRUSS SLICE number from prueth_emac */ static inline int prueth_emac_slice(struct prueth_emac *emac) {