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: 109014 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1225174vqr; Fri, 16 Jun 2023 03:18:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6xfOSljwKOKZSY8DtY0gtZZ62cY4HF6G/V0Z4ebJzCR31/qdKiqsEvm3dbAxn3p/sc7/KO X-Received: by 2002:a17:902:d501:b0:1b0:307c:e706 with SMTP id b1-20020a170902d50100b001b0307ce706mr1313369plg.45.1686910684160; Fri, 16 Jun 2023 03:18:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686910684; cv=none; d=google.com; s=arc-20160816; b=irNAd9eg6Ph7pE3dERFfHejDsY8ONFE/Y768jb1I2KWiLHPuEYArgxNW8N1TqLKbx2 unL+9uPiKccHClQ/yqbwOaCoW8e3fLJ4o+uIAwfazXAQ/xj0OHIS/MJgtD6Tg63KT9ed U6Yjwi4gE0OSAaVXYH8FtZ7NCCftgvxWyKTqAWJQvwXyPVN9cpcn1GL0MzlwEcnC5dq8 vW6hB6BUvvd5+oAmungeq8W3Ma63z6UMbB3nwVtXLSmLQxU19wvTH3YXh6iE01P6CyIX 23mlW3aJpcesKDDEmOVT0fePX9W4jbT/z/3Mp8+rViKvv5uoMDd8Q6Fgubk6+nQxGZCi YkJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=WQbCjIioSzpbvbd6fIl1lAwDG3upjPsirLpyT1TX/+k=; b=yjvyGkBqHpUCyTPUOhq6JhHV25t47XygpoNsyI7DbVa+eMUAm17vjIPhMxXQebJI9u CWKMZxBq2Q5eCmeMmLI0q9OP2Ln3ai57xIZbJlFUNG4SexQwE8ducO7iI/HsD6BxvWTA t1fXLoUkpURSlAkgPzeJce8oZWd+5aAnh4i8Gni35Z1dK3Grf+KUPSi6C422LX7ZYYZT iQJZA1Y1F0TJ/efkI5JJZjQCzambs370VHELfFqt86X+ihvCARUYfu2UNfw+l6ZexO32 k2ZR7LPSOmqiypYmPImrKh5zOdAUJZIkiW6UXmVH4IYKgvMLJqQ1oO4s+Lh79bWqTu5u Fx8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=FwY8GMlD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kz3-20020a170902f9c300b001a65688c863si403301plb.56.2023.06.16.03.17.48; Fri, 16 Jun 2023 03:18:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=FwY8GMlD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244144AbjFPKFz (ORCPT + 99 others); Fri, 16 Jun 2023 06:05:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232166AbjFPKFi (ORCPT ); Fri, 16 Jun 2023 06:05:38 -0400 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC8DB2D69; Fri, 16 Jun 2023 03:05:36 -0700 (PDT) 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-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768854057118709063?= X-GMAIL-MSGID: =?utf-8?q?1768854057118709063?= 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__ */