Received: by 2002:a05:7412:e79e:b0:f3:1519:9f41 with SMTP id o30csp115314rdd; Wed, 22 Nov 2023 10:47:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IG221k3fMJPgNUI3ymnu2xT+hEwlB3jtkf2ZaURclzTIyRpGiXmmdipfxCbOKcNl1GQh6dQ X-Received: by 2002:a17:902:b784:b0:1cf:5670:243e with SMTP id e4-20020a170902b78400b001cf5670243emr3627482pls.13.1700678848946; Wed, 22 Nov 2023 10:47:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700678848; cv=none; d=google.com; s=arc-20160816; b=JLAILxcul5iII9EWmlLSE+IZ5bPDVasyRHC98L5oYPpbQNuYPp0gg99vZ3d6GK06EU qnc9Jl5XC8hPf8O/HbAv2X8xeVbRnHk5bRJNTEi9f5JPhwCFHt2Ir85wq0pdJtPr2jFe 9F48laxmL4EXg4LTKTMM+V9aMuViDXxV3KQEAi41GRPEctM9rm8Q1vuvNTYdWB9T/9wE wgu9AmNbq0Nquz9O98gw8aIY+zUpeCwshK91hB0+oce72td4J2stM/jOlY+3H3y+nYae 6mUAGgqWSoTiG2SnUOlhCEaJ0rxrf0hybgjltkCLiCQXJu4gYAQz5bMPwOfMbJ/0tl+g ve0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=y1fBGTaRbSsoTo5doogPTMVmvkDbZKH9bppQF/sgZqE=; fh=SQHUSLZOByHXzKKaCWG3qmEyW2ICHjQMHJx9M+ZY0DM=; b=QXGC+9Ox7xgWGERFEd+o55Kdr/92ca4VbHKfIzyDvgi2pOKQypNhI35EvKcRzuWsPr gnoOLbkh3RUw2RJab6gLx1J7X4PEBa4zWd50JdNus/KdBGWHMf9Q0QRsUli4V1mXLvHf 5vdkZiljeioxNJeFMJpGo6oTWg+V6F1JVzqzAiefsNqEMpgVvTM0s5YW9ZEYk/8CQukx lAeOXg1U73Kqkg6Nok9aDrImbhEizPzrjxCivRGhJM4HIeNn0t9Tp+7FpFnTjyrbdxWZ 4IwxXW1uu7BO5AR7SWSleGPBqVcaQ17x/vGyyF+vcdnLDCSkb8IU0AErgwFHlJux8F8Q nOVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=p702r9em; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id t13-20020a1709028c8d00b001cf85b05689si25019plo.57.2023.11.22.10.47.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 10:47:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=p702r9em; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C5B9E80ABFD3; Wed, 22 Nov 2023 10:45:50 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231545AbjKVSpt (ORCPT + 99 others); Wed, 22 Nov 2023 13:45:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231513AbjKVSpr (ORCPT ); Wed, 22 Nov 2023 13:45:47 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E08A8E7; Wed, 22 Nov 2023 10:45:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=y1fBGTaRbSsoTo5doogPTMVmvkDbZKH9bppQF/sgZqE=; b=p702r9emhkbRvBPO7sN3lEkiso /rQFsZ6XCANykAc95fAd27zoV5bytiHkSvzmB691lItmkNeldjgv/Ra/V+XaDFG1s0YVy8iLLUJBy 2/8q9JbfiTYx3FuHTMgNAHpa18lX4BM8lLM6QbpZS6V7U2hFtWIq2TTc2wDZPtvkhJbU=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1r5sDs-000uBk-Dl; Wed, 22 Nov 2023 19:45:16 +0100 Date: Wed, 22 Nov 2023 19:45:16 +0100 From: Andrew Lunn To: Tomer Maimon Cc: alexandre.torgue@foss.st.com, tali.perry1@gmail.com, edumazet@google.com, krzysztof.kozlowski+dt@linaro.org, linux-stm32@st-md-mailman.stormreply.com, benjaminfair@google.com, openbmc@lists.ozlabs.org, joabreu@synopsys.com, joel@jms.id.au, devicetree@vger.kernel.org, j.neuschaefer@gmx.net, robh+dt@kernel.org, peppe.cavallaro@st.com, linux-arm-kernel@lists.infradead.org, avifishman70@gmail.com, venture@google.com, linux-kernel@vger.kernel.org, mcoquelin.stm32@gmail.com, netdev@vger.kernel.org, davem@davemloft.net Subject: Re: [PATCH v1 2/2] net: stmmac: Add NPCM support Message-ID: <9ad42fef-b210-496a-aafc-eb2a7416c4df@lunn.ch> References: <20231121151733.2015384-1-tmaimon77@gmail.com> <20231121151733.2015384-3-tmaimon77@gmail.com> <6aeb28f5-04c2-4723-9da2-d168025c307c@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 22 Nov 2023 10:45:50 -0800 (PST) On Wed, Nov 22, 2023 at 07:50:57PM +0200, Tomer Maimon wrote: > Hi Andrew, > > Thanks for your comments > > On Tue, 21 Nov 2023 at 18:42, Andrew Lunn wrote: > > > > > +void npcm_dwmac_pcs_init(struct npcm_dwmac *dwmac, struct device *dev, > > > + struct plat_stmmacenet_data *plat_dat) > > > +{ > > > + u16 val; > > > + > > > + iowrite16((u16)(SR_MII_CTRL >> 9), dwmac->reg + IND_AC_BA_REG); > > > + val = ioread16(dwmac->reg + PCS_SR_MII_CTRL_REG); > > > + val |= PCS_RST; > > > + iowrite16(val, dwmac->reg + PCS_SR_MII_CTRL_REG); > > > + > > > + while (val & PCS_RST) > > > + val = ioread16(dwmac->reg + PCS_SR_MII_CTRL_REG); > > > + > > > + val &= ~(PCS_AN_ENABLE); > > > + iowrite16(val, dwmac->reg + PCS_SR_MII_CTRL_REG); > > > +} > > > > Is this a licensed PCS implementation? Or home grown? If its been > > licensed from somebody, it maybe should live in driver/net/pcs, so > > others can reuse it when they license the same core. > we are using DWC PCS, I don't see support for DWC PCS and I am not > sure it is supposed to be supported at /drivers/net/pcs I've not followed the naming used by Synopsys. Is DWC PCS the same as XPCS? Does Synopsys have multiple PCS implementations? > I do see a patch set to support DWC PCS but I don't think it answers my needs > https://patchwork.ozlabs.org/project/netdev/patch/1559674736-2190-3-git-send-email-weifeng.voon@intel.com/ I _think_ this patch eventually got turned into driver/net/pcs/pcs-xpcs.c What exactly does it not do for you? Andrew