Received: by 2002:ac8:156:0:b0:3e0:cd10:60c8 with SMTP id f22csp559675qtg; Fri, 31 Mar 2023 10:15:09 -0700 (PDT) X-Google-Smtp-Source: AKy350bKuFv3OovTcLT5HJj5KtCSJubAwUBNNrbX1Jbr/ktg2w+z/cRNp3FTRWQmZ/pHFtHtxHPw X-Received: by 2002:a05:6a20:7f8c:b0:da:4b41:8606 with SMTP id d12-20020a056a207f8c00b000da4b418606mr8090992pzj.5.1680282908965; Fri, 31 Mar 2023 10:15:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680282908; cv=none; d=google.com; s=arc-20160816; b=bGM3AV0ybqxlyYQlcH2OEOfP7+gXIjV53Iy8VHJgo7Apg96720EbpoX9v99SxA4b9B M6m0n3hjldmGWK1LMuBLZ2bEaGLvQuMR0693r6fwg6YYMpa+aqxwtfhlkob7/vGSxyBG S4FPEuasytugGOZ0iHuLV1zvGTXnV1IsJ68p4Hs5xNlMuOIDyi/wsbbfJor9H2naR2iG d3D33dUIOl8UdUNUQ1Z0dH2uiR38GgRZR6OadC2oPR0NpI5Wn/rcd0i2wzdqc1fKB/Tz MJoibuPidcTZ3x+xNcj1Iw0ZNLcAstkid2klqMreynozx8BIGw+g1m1FWwCqhhXJIJZy iHEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=8ZPbcZrm94P06c/rgCz3MJOSVMzpEDBexagc9+0E8o4=; b=sJuWbrgXjT6uMUhcotIemnUqT1opDAltTjF3xmqOP5lxjSZutPLrDT+296sr7ng2uX oUWDZClR0pydaxXxT+TWTh0xirtC+bKrkmUySfvRkphzJVcFAuql8NEeg/OIjzxt63Qg bg/D7JAB02K8zxNMy52vcQx5IX8MOEisj743dtz6v7qvifibiPSWpCBHht2cgpYyWn4I 3w2wN+Fh7Dhe2plr3hE0nHabhF9sWS9trbK22nfb38t1SDSj1paKL16fn0CS6LUoVPeW IPSK3gph4uPIP2PJVtw0HYaL/R9cMQsAmmYePPrD1ytwWwiQg2MV/Pi2PdpuAjRPgUZC TDRA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s12-20020a632c0c000000b00502f237fc07si2840392pgs.657.2023.03.31.10.14.57; Fri, 31 Mar 2023 10:15:08 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231331AbjCaQy6 (ORCPT + 99 others); Fri, 31 Mar 2023 12:54:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232351AbjCaQyT (ORCPT ); Fri, 31 Mar 2023 12:54:19 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80777BDE3 for ; Fri, 31 Mar 2023 09:54:18 -0700 (PDT) Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[127.0.0.1]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1piI0q-0007MO-3L; Fri, 31 Mar 2023 18:54:04 +0200 Message-ID: <24d12b0e-0a96-4027-988a-16b433572f68@pengutronix.de> Date: Fri, 31 Mar 2023 18:53:56 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.2 Subject: Re: [Linux-stm32] [PATCH v2 2/2] net: stmmac: dwmac-imx: use platform specific reset for imx93 SoCs Content-Language: en-US To: Shenwei Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team Cc: imx@lists.linux.dev, linux-kernel@vger.kernel.org, Tan Tee Min , Andrey Konovalov , Wong Vee Khee , Jose Abreu , NXP Linux Team , Maxime Coquelin , netdev@vger.kernel.org, Giuseppe Cavallaro , Fabio Estevam , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Revanth Kumar Uppala References: <20230331163143.52506-1-shenwei.wang@nxp.com> <20230331163143.52506-2-shenwei.wang@nxp.com> From: Ahmad Fatoum In-Reply-To: <20230331163143.52506-2-shenwei.wang@nxp.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: a.fatoum@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-2.3 required=5.0 tests=NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Shenwei, On 31.03.23 18:31, Shenwei Wang wrote: > The patch addresses an issue with the reset logic on the i.MX93 SoC, which > requires configuration of the correct interface speed under RMII mode to > complete the reset. The patch implements a fix_soc_reset function and uses > it specifically for the i.MX93 SoCs. [...] > static int > imx_dwmac_parse_dt(struct imx_priv_data *dwmac, struct device *dev) > { > @@ -305,6 +327,9 @@ static int imx_dwmac_probe(struct platform_device *pdev) > if (ret) > goto err_dwmac_init; > > + if (of_machine_is_compatible("fsl,imx93")) > + dwmac->plat_dat->fix_soc_reset = imx_dwmac_mx93_reset; imx_dwmac_mx93_reset is accessing eqos registers in an eqos driver. I don't see why you need to check against SoC compatible instead of device compatible here. My suggestion is to add fix_soc_reset to the struct imx_dwmac_ops associated with "nxp,imx93-dwmac-eqos" compatible and use that to populate plat_dat->fix_soc_reset unconditionally. Thanks, Ahmad > + > ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res); > if (ret) > goto err_drv_probe; -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |