From patchwork Fri Jun 16 10:04:02 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: 13282529 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 D845CEB64D8 for ; Fri, 16 Jun 2023 10:06:01 +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=S1mshSphbMEfvJrWkTxDfQe+LpO037hT5vhVDvTtzPE=; b=swsfuvkjPxZT/k 7T406Y0avJHcQ0NazflbWC9QQBrgNJnuQvJ7NCpO/8FF288awoz54oM4CZPcSYGTKiM1IoLooIJaF 6VRkQOlCSb1gOCoWdBsSoS2JOPF2qCzJA8NBxB9q22kFQaEVfFEqxbRrWa99T801uswBPlq1ASwhD 3W1BOSH9hhxcBjNJ89RorRzfSZ4Ltcv90VFKffJmaJghHkvQNE0ePxfNttWXKIz9hckndml4mN4oY 9A+yaWq4mSlBnORR+gtEq76bQAWW61KI5EZM9zIhciXIONotfFNSS21RVxiysyFrqngy8pXRpb4jc 2ZA76iG5AIjgXX5xMhng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qA6Kq-00HXs5-0s; Fri, 16 Jun 2023 10:05:40 +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 1qA6Km-00HXpa-1M for linux-arm-kernel@lists.infradead.org; Fri, 16 Jun 2023 10:05:38 +0000 X-GND-Sasl: alexis.lothore@bootlin.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1686909931; 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=ZQ1+xbvMnidBmGeXT0nP+KHmlPyfa+N1kU3ye5N9Y2M=; b=Sicjf9ks2PJoF/K2iAiEzxbRBrNIvgpB0mTA1GqD4eEWaZ/tLOB7KOSnyaLhISAEocTwyv RPPNUS3DqAW37JRUxacbu68edCx2UY30ktDi8ZHWIPaU3ya2meksVLKyBsbYx8Z9NbUvDu TufohlkapBs05jQMj4Z1KYsaobvwW/QyXoaLG2TKo6rfGryl2XQ/dTwFIZfZAjjr+0dl3Z uho3Q9qfYJAsLMrKUaCReSYe1T/RMrWJp3tNl2W3+RR20V7o1YE5iN3C/mCGPEeHFOqnDc FRadOLh+++SFziNFZf4WOF9z9MFgLm/RUxOx94IdYHQeAe/56hJzx92ZbJ5n1w== 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 83BF520003; Fri, 16 Jun 2023 10:05:30 +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 1/8] net: stmmac: add IP-specific callbacks for auxiliary snapshot Date: Fri, 16 Jun 2023 12:04:02 +0200 Message-ID: <20230616100409.164583-2-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_030536_769797_3043A89A X-CRM114-Status: UNSURE ( 9.30 ) 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 From: Alexis Lothoré Since auxiliary snapshots configuration registers may be different depending the DWMAC IP, we need a specific set of callbacks to - configure timestamp snapshot triggers - clear the snapshots FIFO Signed-off-by: Alexis Lothoré --- drivers/net/ethernet/stmicro/stmmac/hwif.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/hwif.h b/drivers/net/ethernet/stmicro/stmmac/hwif.h index 6ee7cf07cfd7..d0b2f13510aa 100644 --- a/drivers/net/ethernet/stmicro/stmmac/hwif.h +++ b/drivers/net/ethernet/stmicro/stmmac/hwif.h @@ -419,6 +419,10 @@ struct stmmac_ops { void (*fpe_send_mpacket)(void __iomem *ioaddr, enum stmmac_mpacket_type type); int (*fpe_irq_status)(void __iomem *ioaddr, struct net_device *dev); + /* Auxiliary snapshots */ + void (*extts_configure)(void __iomem *ioaddr, int ext_snapshot_num, + bool on, struct net_device *dev); + int (*clear_snapshot_fifo)(void __iomem *ioaddr); }; #define stmmac_core_init(__priv, __args...) \ @@ -523,6 +527,10 @@ struct stmmac_ops { stmmac_do_void_callback(__priv, mac, fpe_send_mpacket, __args) #define stmmac_fpe_irq_status(__priv, __args...) \ stmmac_do_callback(__priv, mac, fpe_irq_status, __args) +#define stmmac_extts_configure(__priv, __args...) \ + stmmac_do_void_callback(__priv, mac, extts_configure, __args) +#define stmmac_clear_snapshot_fifo(__priv, __args...) \ + stmmac_do_callback(__priv, mac, clear_snapshot_fifo, __args) /* PTP and HW Timer helpers */ struct stmmac_hwtimestamp {