From patchwork Tue Jul 9 08:21:18 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: 13727420 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 6AB23C2BD09 for ; Tue, 9 Jul 2024 08:22:58 +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: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:In-Reply-To:References:List-Owner; bh=7XDcGnxl+L+Up+OM7xPAJaHLrc0hSR9f/AUvnRoMTks=; b=oMvQ8r7wBTqci6kRGCdNEFUbEL qdWh5sow3zz3oJgQVFRKA/06ST3Z2SV/VKnnUqN5tX/NnDvaF/4nhvVm/lzarTp4Pncei8FxR05I0 3kfragIl6JmAAxNEexzhTHsvsBxhOgz5dl/giPhtnMs4HnAiZheg34Ja4/vAG6Xh67oPBV1rCCuil iej/4b33fuKD648TLqggL7jd6IgZUTyXaQzd601KJ8ghTwVSIfoWs/guV1y++yiSN+q08sHEBspaT JDyZLmkIwLCpuqGjIs2/HpyUE+jwtHPfz9fHcnWo8SmPd0w8eMoWyCR996oScOGyYak2biTRbjsR8 mOyGn2sw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sR67Z-00000006Ni2-3qlQ; Tue, 09 Jul 2024 08:22:45 +0000 Received: from mail-oo1-xc2f.google.com ([2607:f8b0:4864:20::c2f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sR67J-00000006Nco-0aRv for linux-arm-kernel@lists.infradead.org; Tue, 09 Jul 2024 08:22:30 +0000 Received: by mail-oo1-xc2f.google.com with SMTP id 006d021491bc7-5c1d2f7ab69so2512829eaf.3 for ; Tue, 09 Jul 2024 01:22:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720513348; x=1721118148; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=7XDcGnxl+L+Up+OM7xPAJaHLrc0hSR9f/AUvnRoMTks=; b=Exusv162XFtpjONihL4DlVNM4XimgV/6uVszmZPBZQa12fWd/eeFepX/NBj7rv/Xih RBhBfk4uQxhaI3QlYw0kceU7mdQ5qyo9EdV2I3pyIL5YArd8t9HCTDv6ngnYlUoDnFr4 HQlekqj8tOHAJWCFi8TLI4YSCaEMJH70HD8TgW46SXuksR8dkyp/RTUo03aRXAdxKMCz +KZ1e7xtz+sz3lYSuQt6cSxmFIUf49DKbiQUyU42PXPlQ8NHo0JHq+k6mgiL+coATDLR RlKqwCKzqz49nG0ZNX3fD4ijAzNDTeRieFLvfE4YUH/mAbmqzkFIWq/upfxql9dc9+vJ dDkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720513348; x=1721118148; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7XDcGnxl+L+Up+OM7xPAJaHLrc0hSR9f/AUvnRoMTks=; b=CMvEV1BB+32RjVKHCayciAZhnWrnT2GEmFvGLz35IA+RsWQbgjMu8rF3adCMOo+Hqj 01wRfX6pIUBlYbXTxptljLJ7e1nTFG9u2Ls65F5Zi9aJJFuMmv+iTThpRqBcfQ/0rpic Z2uWWCbfh7KpgpHOTe9BKO0UhcnReZTe97h2mXrKZP5KZkV9vgyF7vJD409GxSu7RsXC zx9/Y+4nMI5Tdjq1ThqOXE017hVDYjLG+qEKsPXm974NUu0rmilcpy5Xj2riRNsxOQE2 KQDC7ahGQkcF9HcyGjDueYH7L8j0MfIvnI63rX1jEwmnDItpu5bBQUyKjayxurS7X4+L L7WA== X-Forwarded-Encrypted: i=1; AJvYcCU0bEebCmyiBlKAaf5C/OTLevkbPkkuOvm4J/U3ROKOtYH+/+qUJ97MhXYfTFZPDg3sNqpkjob55dyKOB+hEqBFTZ5rOFf+Yu+e5zbVFeFGTPuJyc8= X-Gm-Message-State: AOJu0YyX99XA0brCNIpdUnCOqNPwWjGJzmdEQykBUEIQpVFEswaBArql i6fyLsw1hqXVQ8ncQKXIOHt4QHHpyQxkkXO+L2/dYpcWKRvNnwNh X-Google-Smtp-Source: AGHT+IFPsJC/yKbPpj0KK2U8xPVQYC1rgQUbrnuG7dcUGRNNy6Kjbw0VGZ2c7DelhGUEXHPww0fMHA== X-Received: by 2002:a05:6358:c3a2:b0:1aa:a177:359b with SMTP id e5c5f4694b2df-1aade0810ddmr150867855d.15.1720513347606; Tue, 09 Jul 2024 01:22:27 -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.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jul 2024 01:22:27 -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 0/7] net: stmmac: refactor FPE for gmac4 and xgmac Date: Tue, 9 Jul 2024 16:21:18 +0800 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240709_012229_198197_B4582535 X-CRM114-Status: GOOD ( 11.59 ) 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 Refactor FPE implementation by moving common code for DWMAC4 and DWXGMAC into a separate FPE module. FPE implementation for DWMAC4 and DWXGMAC differs only for: 1) Offset address of MAC_FPE_CTRL_STS 2) FPRQ(Frame Preemption Residue Queue) field in MAC_RxQ_Ctrl1 Tested on DWMAC CORE 5.20a and DWXGMAC CORE 3.20a Furong Xu (7): net: stmmac: xgmac: drop incomplete FPE implementation net: stmmac: gmac4: drop FPE implementation for refactoring net: stmmac: refactor Frame Preemption(FPE) implementation net: stmmac: gmac4: complete FPE support net: stmmac: xgmac: rename XGMAC_RQ to XGMAC_FPRQ net: stmmac: xgmac: complete FPE support net: stmmac: xgmac: enable Frame Preemption Interrupt by default drivers/net/ethernet/stmicro/stmmac/Makefile | 2 +- drivers/net/ethernet/stmicro/stmmac/common.h | 1 + .../net/ethernet/stmicro/stmmac/dwmac4_core.c | 6 - drivers/net/ethernet/stmicro/stmmac/dwmac5.c | 66 --------- drivers/net/ethernet/stmicro/stmmac/dwmac5.h | 16 --- .../net/ethernet/stmicro/stmmac/dwxgmac2.h | 9 +- .../ethernet/stmicro/stmmac/dwxgmac2_core.c | 27 ---- drivers/net/ethernet/stmicro/stmmac/hwif.c | 7 + drivers/net/ethernet/stmicro/stmmac/hwif.h | 30 ++-- .../net/ethernet/stmicro/stmmac/stmmac_fpe.c | 131 ++++++++++++++++++ .../net/ethernet/stmicro/stmmac/stmmac_fpe.h | 16 +++ 11 files changed, 177 insertions(+), 134 deletions(-) create mode 100644 drivers/net/ethernet/stmicro/stmmac/stmmac_fpe.c create mode 100644 drivers/net/ethernet/stmicro/stmmac/stmmac_fpe.h