Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp568489rdf; Tue, 21 Nov 2023 09:56:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IG7PDd9FRx9AhvDWiPOXRAnmpRY4ImLptVQUmtwsM2fhLXjTUIRAP+fabtwIbbOdK+J783J X-Received: by 2002:a05:6a21:78a2:b0:187:758e:9781 with SMTP id bf34-20020a056a2178a200b00187758e9781mr4845273pzc.17.1700589410995; Tue, 21 Nov 2023 09:56:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700589410; cv=none; d=google.com; s=arc-20160816; b=s1qKdNwHOg6R7RXKmLYNMTkD8JPBf+ZHd0VsKDjTsAfSh3PtrfwguY46feQfrH6vTx qkK91iDae2vFeBf8fqNdFdPMf8/6lEDroPhixuYJYbH0Cy03tjqAoG4h8Q26JP4fxPGH RO7zLpjzx9F+M/YIjY2p9NRarW9eJzoJ0R7NREW0RdbzUC/FNhBlyGTNu9D+IRcM9xwQ Z9EQGUStSrwwqC+MKGR6dnUVnMu2G6h/0hSOHWc+GihPcrWJhxxHH+Ln01oGPJZagK4k z+pYrkwDjWvfW15aNjJRd2bXZnnWhxsrN1nuPiKpmq+yC92n5NqWp1Qk/RZ11r79u2LS S89g== 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=aZVSbYQtEsrPqaqCsxCo31rNgSiygRJ3cLDc3knYFXU=; fh=Iz+dyluSrN8PKBtnOKXFa6VJbuEuYKxHAoQtkdUIrsg=; b=hH00ys7wGo7b/c5kS5zB8Rh6AglEZUBA/BNmj0lHDAWi1ZM0UNzk9TrprShZnkSJjz IlJemwyxvAougvolRL8mJz0wKBl66GLeaAU0a8XI50ECjQPgqM0rq8BOZ+yLEZYJCWeH /oNQpNFIlyYXasKHcGo0UOl5jMveOJS+/ZSCmqr37OluPEv+9xw8J7SYHDLnHc4BqVvl OBQtygM6gIZSZWWZ88tP821BB5y2MMnyCf79ayYOLYxm7glyRqmWroEzka2mmS/qIFU7 URHoGfMVHldCcX3gsJ5gJzq8awicDvnhUUnrPE+bsGz03ayIXjfm990nTbJsKgM+0Kii Ic/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="bl/aQJrf"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id f22-20020a635556000000b00578cc8d2599si10167800pgm.211.2023.11.21.09.56.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 09:56:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="bl/aQJrf"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 254D780752B4; Tue, 21 Nov 2023 08:01:45 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234708AbjKUQB2 (ORCPT + 99 others); Tue, 21 Nov 2023 11:01:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234507AbjKUQB2 (ORCPT ); Tue, 21 Nov 2023 11:01:28 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2704E139; Tue, 21 Nov 2023 08:01:24 -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=aZVSbYQtEsrPqaqCsxCo31rNgSiygRJ3cLDc3knYFXU=; b=bl/aQJrfTUHDANhv3Dm5Ml7ZlX okOdikl4AvtMqEPCYzdztmNsTVsVk54SMW+rRWhtfEdvZIL45Bq24Hiq59b/Sdqw/RhiBP96bZzgr A4kORTZ2Boqv7A76JCAy1UhWdqd0PYSbFYBy8O1c0KYzzbRX6IJRtyCjZZPIY4IshspA=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1r5TBF-000m1v-SN; Tue, 21 Nov 2023 17:00:53 +0100 Date: Tue, 21 Nov 2023 17:00:53 +0100 From: Andrew Lunn To: Tomer Maimon Cc: davem@davemloft.net, edumazet@google.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, alexandre.torgue@foss.st.com, peppe.cavallaro@st.com, joabreu@synopsys.com, mcoquelin.stm32@gmail.com, avifishman70@gmail.com, tali.perry1@gmail.com, joel@jms.id.au, andrew@codeconstruct.com.au, venture@google.com, yuenn@google.com, benjaminfair@google.com, j.neuschaefer@gmx.net, openbmc@lists.ozlabs.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v1 2/2] net: stmmac: Add NPCM support Message-ID: <6aeb28f5-04c2-4723-9da2-d168025c307c@lunn.ch> References: <20231121151733.2015384-1-tmaimon77@gmail.com> <20231121151733.2015384-3-tmaimon77@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231121151733.2015384-3-tmaimon77@gmail.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Tue, 21 Nov 2023 08:01:45 -0800 (PST) > +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. Andrew