Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5750532rwd; Wed, 24 May 2023 06:22:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7HIzDpQ84O/kH9mY4RCfvyfJTeQsIw9lmLl61DdtjRRF350GHfNLSe3oqolt/B7B8Ut7m2 X-Received: by 2002:a17:903:41c4:b0:1af:ccc3:25d1 with SMTP id u4-20020a17090341c400b001afccc325d1mr6774777ple.62.1684934561973; Wed, 24 May 2023 06:22:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684934561; cv=none; d=google.com; s=arc-20160816; b=l4kyWgHAjhudWc67ycGr6e1bDkDcSlS9yLR62pFJzGqPSjy+SOJ9Cyn5ldyRGG0Pk2 fvuqdquBrKWgcX0/Ej6MuXU7KBB6xUih84GRpKxb88ZC09IlSZmIku2sDkdNrSM4cJdh jb2u1l6olaaclKomzmlOfh06HULBsKM+UbJaBX1l2EgdtXtm+H9uYcZPAhBLR0d/u17+ R7tn8W30wP+lP8c0ntg0gxsAH0pxuSFpZwKyPWk14a4NZoc43a8USyCSiUgSQeLFIAb+ 86NR+TddpTOC4f+onPui5CnSpxsjj4UyfSVDWWBo1k4z9Ri5uvVh/Tx1RgnNA60RLb3/ CuPw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=Dlu+LIg1CB+EdnEPMRmgOuwoUG3Sx5A6cdZB48OIf+o=; b=v/x3zt/6bjlz4z7WXYbHcNv52+4huewd4EqJ6nPQZJTyo9QyH5hyjllBWIW/+lDbu1 gVaWN966UhOrq/pAFq6Sp3/iPOYk2F0TZOX5sXDulAPXvb2MnKeR6qGxMCmQ11X3PCMi w4358gO3m07jJMhQdtXyuLWHuebuWPM0G2sdRdQm7B7uEkt3aSmaeRw5rsRZF3AwMavY KOX58Wu0uyKk3JjQVrCP08EbCYvKN8mQ6mYBOSzwM+N1JEnryzZ01ORsyKzLHKHagqe/ igSueDQ5B/LfXUNnVMmc4u8reCPcdyxodnuHvN1qLUDgHWHSeSHRRofQNNYFrEMr42kr w74w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=TXeMRzQj; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n10-20020a170902e54a00b001add2b13fb4si1870214plf.620.2023.05.24.06.22.26; Wed, 24 May 2023 06:22:41 -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=TXeMRzQj; 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 S232079AbjEXNIS (ORCPT + 99 others); Wed, 24 May 2023 09:08:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234096AbjEXNIQ (ORCPT ); Wed, 24 May 2023 09:08:16 -0400 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D85FAB6; Wed, 24 May 2023 06:08:14 -0700 (PDT) Received: (Authenticated sender: maxime.chevallier@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 01960FF810; Wed, 24 May 2023 13:08:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1684933693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Dlu+LIg1CB+EdnEPMRmgOuwoUG3Sx5A6cdZB48OIf+o=; b=TXeMRzQjPBVJLFm8zj+9XMU3hmTOf+SK7zuShVTqMztutIcqd118u6v0w9R/KPPCE7h8qp GZbNPXSmJBJUYjLN9W01if1NHI2dXvYZbS517YQJ8EetG4J6DpBW5wjXXkPOA08EqBu3TP KxLLjyy2yl/fWTUx0ccinXmfglU9jXnmoVlfviY3awUi6quztjFfpQR1nFhRG7IceaZuri 0RR0QA3LX/w8M2UH/wiT/VpdyWMCD8hGm7InL3BIxtVzA6Fkx0TsCMLbZGNNzPbozgN+yo aJcC+0s+iS9aJYCZU2PM7+PLdc8TUnkwkpvzHajszsWdSoVUUGJdVsz6VJ6C3A== From: Maxime Chevallier To: Mark Brown , davem@davemloft.net Cc: Maxime Chevallier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, alexis.lothore@bootlin.com, thomas.petazzoni@bootlin.com, Andrew Lunn , Jakub Kicinski , Eric Dumazet , Paolo Abeni , Florian Fainelli , Heiner Kallweit , Russell King , Vladimir Oltean , Ioana Ciornei , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Maxime Coquelin , Jose Abreu , Alexandre Torgue , Giuseppe Cavallaro Subject: [PATCH net-next 0/4] net: add a regmap-based mdio driver and drop TSE PCS Date: Wed, 24 May 2023 15:08:03 +0200 Message-Id: <20230524130807.310089-1-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Hello everyone, This series follows-up on the worki [1] aiming at dropping the altera TSE PCS driver, as it turns out to be a version of the Lynx PCS exposed as a memory-mapped block, instead of living on an MDIO bus. One step of this removal involved creating a regmap-based mdio driver that translates MDIO accesses into the actual underlying bus that exposes the register. The register layout must of course match the standard MDIO layout, but we can now account for differences in stride with recent work on the regmap subsystem [2]. Mark, Net maintainers, this series depends on the patch e12ff2876493 that was recently merged into the regmap tree [3]. For this series to be usable in net-next, this patch must be applied beforehand. Should Mark create a tag that would then be merged into net-next ? This series introduces a new MDIO driver, and uses it to convert Altera TSE from the actual TSE PCS driver to Lynx PCS. Since it turns out dwmac_socfpga also uses a TSE PCS block, port that driver to Lynx as well. Thanks, Maxime [1] : https://lore.kernel.org/all/20230324093644.464704-1-maxime.chevallier@bootlin.com/ [2] : https://lore.kernel.org/all/20230407152604.105467-1-maxime.chevallier@bootlin.com/#t [3] : https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git/commit/?id=e12ff28764937dd58c8613f16065da60da149048 Maxime Chevallier (4): net: mdio: Introduce a regmap-based mdio driver net: ethernet: altera-tse: Convert to mdio-regmap and use PCS Lynx net: pcs: Drop the TSE PCS driver net: stmmac: dwmac-sogfpga: use the lynx pcs driver MAINTAINERS | 14 +- drivers/net/ethernet/altera/Kconfig | 2 + drivers/net/ethernet/altera/altera_tse.h | 1 + drivers/net/ethernet/altera/altera_tse_main.c | 57 +++- drivers/net/ethernet/stmicro/stmmac/Kconfig | 1 + drivers/net/ethernet/stmicro/stmmac/Makefile | 2 +- .../ethernet/stmicro/stmmac/altr_tse_pcs.c | 257 ------------------ .../ethernet/stmicro/stmmac/altr_tse_pcs.h | 29 -- drivers/net/ethernet/stmicro/stmmac/common.h | 1 + .../ethernet/stmicro/stmmac/dwmac-socfpga.c | 90 ++++-- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 12 +- drivers/net/mdio/Kconfig | 10 + drivers/net/mdio/Makefile | 1 + drivers/net/mdio/mdio-regmap.c | 85 ++++++ drivers/net/pcs/Kconfig | 6 - drivers/net/pcs/Makefile | 1 - drivers/net/pcs/pcs-altera-tse.c | 160 ----------- include/linux/mdio/mdio-regmap.h | 25 ++ include/linux/pcs-altera-tse.h | 17 -- 19 files changed, 258 insertions(+), 513 deletions(-) delete mode 100644 drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.c delete mode 100644 drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.h create mode 100644 drivers/net/mdio/mdio-regmap.c delete mode 100644 drivers/net/pcs/pcs-altera-tse.c create mode 100644 include/linux/mdio/mdio-regmap.h delete mode 100644 include/linux/pcs-altera-tse.h -- 2.40.1