From patchwork Fri Jun 16 10:04:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alexis_Lothor=C3=A9?= X-Patchwork-Id: 13282532 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 A6E69EB64DD for ; Fri, 16 Jun 2023 10:06:13 +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=g6zqkuK6uvAYgrZNgyJF/2dABQoh7zYSYVqMYWijJLA=; b=1KLkU6R/W1WoOH BQBAkzfMOOqxXyd4Qp+3qJGzkR2XzN6FDBXj0rSQpIn9n7JFzIjyP/RR/x8tWTXkG7JtY9tAuBE+8 4/lTC2qr7iqoL93s5bgpXG3lYl3A4aYNDCn7PkuTclyJw3wgUp/wDEZcTddWApqvuq23vC9yGs9Vn uYY5vB5e2h6MOTD4q68Ib6U+/y2r/7Cw0e95SzBYW3UgGVK9630D/RpwWQTDHd7m//lHRhQjlyaXU Njezpo9GKjeuL5oGCEktjb2WUquMYYtUFO2jXfm1nfnGsdiFgy1NpwcUWcnDBt4PUCUWpybJlqYBU LzWObOMDnO6jh7oAa67w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qA6L2-00HXwg-0n; Fri, 16 Jun 2023 10:05:52 +0000 Received: from relay7-d.mail.gandi.net ([2001:4b98:dc4:8::227]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qA6Kn-00HXpg-0K for linux-arm-kernel@lists.infradead.org; Fri, 16 Jun 2023 10:05:39 +0000 X-GND-Sasl: alexis.lothore@bootlin.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1686909935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WQbCjIioSzpbvbd6fIl1lAwDG3upjPsirLpyT1TX/+k=; b=FwY8GMlD/bBWxk8342rA6F1IqDZ1jjrj++Nq7MUtdB9mGuU2C72330sqMSEubUgeEIby8G /FuksITI31BlpVpofEogiJe3NdE4Z6hwTtxfe3ErdY5NALmv5t5hivLA/jaS8xC1mvMdkd e5uSI0AB5xO0bjjobDQqbRV55DjeDv6ZmqFrijmS+caeeq2xP72H2zv8CeFzAlmQgfAPhc L1S5kQ8TPNghKGkjm3xR+xQX4NL9Uumb8MGH9pOAS30gyGcKbq0nZBbk+KfGxcd1+6mzkq nI8ebkmz5rZgSV/WTqv7Bark6usUQJnoutNBXNcICbmq3FNiSLzngxksao9tEA== X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 6708420002; Fri, 16 Jun 2023 10:05:34 +0000 (UTC) From: alexis.lothore@bootlin.com To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Richard Cochran Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Thomas Petazzoni , Nicolas Carrier Subject: [PATCH net-next 4/8] net: stmmac: move common defines in stmmac_ptp.h Date: Fri, 16 Jun 2023 12:04:05 +0200 Message-ID: <20230616100409.164583-5-alexis.lothore@bootlin.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230616100409.164583-1-alexis.lothore@bootlin.com> References: <20230616100409.164583-1-alexis.lothore@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230616_030537_443497_AA646421 X-CRM114-Status: GOOD ( 11.89 ) 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 From: Alexis Lothoré Even if the address of registers containing statuses is not the same between dwamc4 and dwmac 1000, the offsets of interest inside those register are the same regarding auxiliary snapshots. As a consequence, move those offset definitions in stmmac_ptp.h Signed-off-by: Alexis Lothoré --- drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 5 ----- drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h | 4 +++- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h b/drivers/net/ethernet/stmicro/stmmac/dwmac4.h index 9e7ba5f2e53a..32a15c020a43 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4.h @@ -313,11 +313,6 @@ enum power_event { #define GMAC_L4DP0_SHIFT 16 #define GMAC_L4SP0 GENMASK(15, 0) -/* MAC Timestamp Status */ -#define GMAC_TIMESTAMP_AUXTSTRIG BIT(2) -#define GMAC_TIMESTAMP_ATSNS_MASK GENMASK(29, 25) -#define GMAC_TIMESTAMP_ATSNS_SHIFT 25 - /* MTL registers */ #define MTL_OPERATION_MODE 0x00000c00 #define MTL_FRPE BIT(15) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h index 92ed421702b9..04bbf12dfd4b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h @@ -64,6 +64,8 @@ #define PTP_SSIR_SSINC_MAX 0xff #define GMAC4_PTP_SSIR_SSINC_SHIFT 16 - +/* MAC Timestamp Status */ +#define GMAC_TIMESTAMP_ATSNS_MASK GENMASK(29, 25) +#define GMAC_TIMESTAMP_ATSNS_SHIFT 25 #endif /* __STMMAC_PTP_H__ */