From patchwork Tue Jul 9 08:21:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Furong Xu <0x1207@gmail.com> X-Patchwork-Id: 13727422 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 8074AC3DA41 for ; Tue, 9 Jul 2024 08:23:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=x4bF8onLf0sdE3t3KB8zz6I+NlPIzXeOdYuUooT+xDk=; b=goHVapcSbhKA8gEArQIXT9Nv7E oXYDq2jUDHuRl0P/igfP4SKNQ/tuMu0nqMTIcj4GAQIZPnDZdjq2TUu7Gns7JVZ7SlQbBgMiCDvI8 IpgV2LLLB1wZJSaZTXkJcUiEn4hSkLxkTn4zUJvCtkIe7VBRPlHEly8TipYS0kt3JeVc65QGcyamc WJw7R0tN4E4zAv4KF/ZwSL99W58459a6QqOQXpOy3bwDEKl0YT1ACV+eIaVMvPMmUpaFTF1hJpirQ yatsRJs+b8yHCU5BjUxA71pr3mimGLPQzprO+2GN7ks1CwYMWTmk89HEYymt7lb8P7HrsRCwjBeJC NbzqD4Rg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sR683-00000006NuV-3S42; Tue, 09 Jul 2024 08:23:15 +0000 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sR67i-00000006Nl4-0efm for linux-arm-kernel@lists.infradead.org; Tue, 09 Jul 2024 08:22:56 +0000 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-70b42250526so798813b3a.1 for ; Tue, 09 Jul 2024 01:22:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720513373; x=1721118173; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=x4bF8onLf0sdE3t3KB8zz6I+NlPIzXeOdYuUooT+xDk=; b=XquFhhtm5QFruK4b6njFi+5KQAwOMoyy0PQxbJeWV9aRp2IaD6nj8yIE5HAoUw9PH+ qyIHaxkErPKNiY3UfsFeVSa5x6F4ARGffu4Gvs/7qIi808j4Dg6cJjNSoZFIbDmew8r6 vatOieqXhM+3ywekh5jM3OtBSKmho/Q9fK3epbGnYS9NuKPASKqXLqM6xd7yfL44gXge h0V7lke7yfRXEA8MVcugYqqb+VX5pR2Brhbdw4ph4PAkMEtO/HIe3zRZF8Rolnjy/wrU oMXvM5s12X4/wzabitlBsrVWkcqpr35hoGXkWYlXd/XsO+jBQvYYvD+BXRk2jX/1pFCf lQ0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720513373; x=1721118173; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x4bF8onLf0sdE3t3KB8zz6I+NlPIzXeOdYuUooT+xDk=; b=Kmrcl+wxYusFfRivLQzESCw59oSV5rJRxfCCcbt9MlJCBhRPOw5QGSkmza1IS7GCHg G9EK+PxCRHJS0Y3US0odkYnDensYdjQykWwTwbUECf5wNN/Qqer6cnYGJFdGo/BZEaRM Ws5Q1UdKmTNXrzEYJM5mMdtomzg/YJAi4jByjpaYfEEbsfyCPAYRoGXVLds5arb+mO4x g5/U2LbGMT6ZAzrmCswrxk1dQrEUIJOi+3GARPw9TQGauUQH6K08d+phplUvp5wpyYon +Ggy+ZNqRo3l/L2E+HOIuB77IYU7D/0UJSJTNG/RSGkBLdkLEe1cSkdYrdlj/DHnoFJ2 kE+A== X-Forwarded-Encrypted: i=1; AJvYcCVXUdiqAySqZeqfWt2eD0FHAdweCZZXOXTBzwsGVpSmmxjx2Vc27FVlNgR3gdQy4V8LqgOSjGi47lk6DuXdQ65g0W495IQzPZhQMrbSfDYXRYbzupE= X-Gm-Message-State: AOJu0Yx+atYxe/5H0rL3ybel2t36q3vRUliKY4JUvQtU1KkEyVOWEFiv F9l1j26d/79f5uKWYWMi07ITK2p6cFtcgmLshtX3qpLQZL5f05cg X-Google-Smtp-Source: AGHT+IHdf/+Sw63Qfm2YgFi6J6SIA2YjPniRp27/Dn9i48xVvX5kBw2EaQzrGqnejAwaX/tV/o1qkg== X-Received: by 2002:a05:6a20:c70b:b0:1c0:f20c:5bae with SMTP id adf61e73a8af0-1c2983983b4mr2047130637.47.1720513373172; Tue, 09 Jul 2024 01:22:53 -0700 (PDT) Received: from localhost.localdomain ([129.146.253.192]) by smtp.googlemail.com with ESMTPSA id 98e67ed59e1d1-2c99a92a430sm9588929a91.4.2024.07.09.01.22.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jul 2024 01:22:52 -0700 (PDT) From: Furong Xu <0x1207@gmail.com> To: Andrew Lunn , "David S. Miller" , Alexandre Torgue , Jose Abreu , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Joao Pinto Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, xfr@outlook.com, rock.xu@nio.com, Furong Xu <0x1207@gmail.com> Subject: [PATCH net-next v1 2/7] net: stmmac: gmac4: drop FPE implementation for refactoring Date: Tue, 9 Jul 2024 16:21:20 +0800 Message-Id: <98183e72d59cc8ce71dd9fd25a65983ff69dfcd1.1720512888.git.0x1207@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240709_012254_270453_1B3A16B4 X-CRM114-Status: GOOD ( 16.22 ) 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 The FPE support for gmac4 is complete, still drop it temporarily. Once FPE implementation is refactored, gmac4 support will be added. Signed-off-by: Furong Xu <0x1207@gmail.com> --- .../net/ethernet/stmicro/stmmac/dwmac4_core.c | 6 -- drivers/net/ethernet/stmicro/stmmac/dwmac5.c | 66 ------------------- drivers/net/ethernet/stmicro/stmmac/dwmac5.h | 16 ----- 3 files changed, 88 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c index dbd9f93b2460..1505ac738b13 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c @@ -1265,9 +1265,6 @@ const struct stmmac_ops dwmac410_ops = { .set_arp_offload = dwmac4_set_arp_offload, .config_l3_filter = dwmac4_config_l3_filter, .config_l4_filter = dwmac4_config_l4_filter, - .fpe_configure = dwmac5_fpe_configure, - .fpe_send_mpacket = dwmac5_fpe_send_mpacket, - .fpe_irq_status = dwmac5_fpe_irq_status, .add_hw_vlan_rx_fltr = dwmac4_add_hw_vlan_rx_fltr, .del_hw_vlan_rx_fltr = dwmac4_del_hw_vlan_rx_fltr, .restore_hw_vlan_rx_fltr = dwmac4_restore_hw_vlan_rx_fltr, @@ -1317,9 +1314,6 @@ const struct stmmac_ops dwmac510_ops = { .set_arp_offload = dwmac4_set_arp_offload, .config_l3_filter = dwmac4_config_l3_filter, .config_l4_filter = dwmac4_config_l4_filter, - .fpe_configure = dwmac5_fpe_configure, - .fpe_send_mpacket = dwmac5_fpe_send_mpacket, - .fpe_irq_status = dwmac5_fpe_irq_status, .add_hw_vlan_rx_fltr = dwmac4_add_hw_vlan_rx_fltr, .del_hw_vlan_rx_fltr = dwmac4_del_hw_vlan_rx_fltr, .restore_hw_vlan_rx_fltr = dwmac4_restore_hw_vlan_rx_fltr, diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac5.c b/drivers/net/ethernet/stmicro/stmmac/dwmac5.c index e02cebc3f1b7..1c431b918719 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac5.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac5.c @@ -572,69 +572,3 @@ int dwmac5_flex_pps_config(void __iomem *ioaddr, int index, writel(val, ioaddr + MAC_PPS_CONTROL); return 0; } - -void dwmac5_fpe_configure(void __iomem *ioaddr, struct stmmac_fpe_cfg *cfg, - u32 num_txq, u32 num_rxq, - bool enable) -{ - u32 value; - - if (enable) { - cfg->fpe_csr = EFPE; - value = readl(ioaddr + GMAC_RXQ_CTRL1); - value &= ~GMAC_RXQCTRL_FPRQ; - value |= (num_rxq - 1) << GMAC_RXQCTRL_FPRQ_SHIFT; - writel(value, ioaddr + GMAC_RXQ_CTRL1); - } else { - cfg->fpe_csr = 0; - } - writel(cfg->fpe_csr, ioaddr + MAC_FPE_CTRL_STS); -} - -int dwmac5_fpe_irq_status(void __iomem *ioaddr, struct net_device *dev) -{ - u32 value; - int status; - - status = FPE_EVENT_UNKNOWN; - - /* Reads from the MAC_FPE_CTRL_STS register should only be performed - * here, since the status flags of MAC_FPE_CTRL_STS are "clear on read" - */ - value = readl(ioaddr + MAC_FPE_CTRL_STS); - - if (value & TRSP) { - status |= FPE_EVENT_TRSP; - netdev_info(dev, "FPE: Respond mPacket is transmitted\n"); - } - - if (value & TVER) { - status |= FPE_EVENT_TVER; - netdev_info(dev, "FPE: Verify mPacket is transmitted\n"); - } - - if (value & RRSP) { - status |= FPE_EVENT_RRSP; - netdev_info(dev, "FPE: Respond mPacket is received\n"); - } - - if (value & RVER) { - status |= FPE_EVENT_RVER; - netdev_info(dev, "FPE: Verify mPacket is received\n"); - } - - return status; -} - -void dwmac5_fpe_send_mpacket(void __iomem *ioaddr, struct stmmac_fpe_cfg *cfg, - enum stmmac_mpacket_type type) -{ - u32 value = cfg->fpe_csr; - - if (type == MPACKET_VERIFY) - value |= SVER; - else if (type == MPACKET_RESPONSE) - value |= SRSP; - - writel(value, ioaddr + MAC_FPE_CTRL_STS); -} diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac5.h b/drivers/net/ethernet/stmicro/stmmac/dwmac5.h index bf33a51d229e..00b151b3b688 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac5.h +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac5.h @@ -11,15 +11,6 @@ #define PRTYEN BIT(1) #define TMOUTEN BIT(0) -#define MAC_FPE_CTRL_STS 0x00000234 -#define TRSP BIT(19) -#define TVER BIT(18) -#define RRSP BIT(17) -#define RVER BIT(16) -#define SRSP BIT(2) -#define SVER BIT(1) -#define EFPE BIT(0) - #define MAC_PPS_CONTROL 0x00000b70 #define PPS_MAXIDX(x) ((((x) + 1) * 8) - 1) #define PPS_MINIDX(x) ((x) * 8) @@ -102,12 +93,5 @@ int dwmac5_rxp_config(void __iomem *ioaddr, struct stmmac_tc_entry *entries, int dwmac5_flex_pps_config(void __iomem *ioaddr, int index, struct stmmac_pps_cfg *cfg, bool enable, u32 sub_second_inc, u32 systime_flags); -void dwmac5_fpe_configure(void __iomem *ioaddr, struct stmmac_fpe_cfg *cfg, - u32 num_txq, u32 num_rxq, - bool enable); -void dwmac5_fpe_send_mpacket(void __iomem *ioaddr, - struct stmmac_fpe_cfg *cfg, - enum stmmac_mpacket_type type); -int dwmac5_fpe_irq_status(void __iomem *ioaddr, struct net_device *dev); #endif /* __DWMAC5_H__ */