From patchwork Tue Jan 30 12:43:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Primoz Fiser X-Patchwork-Id: 1892902 X-Patchwork-Delegate: festevam@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=norik.com header.i=@norik.com header.a=rsa-sha256 header.s=default header.b=NTkX5rg+; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TPPwy1LPWz23gZ for ; Tue, 30 Jan 2024 23:43:46 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6D3EB87CFF; Tue, 30 Jan 2024 13:43:43 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=norik.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=norik.com header.i=@norik.com header.b="NTkX5rg+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3165787CFF; Tue, 30 Jan 2024 13:43:42 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from cpanel.siel.si (cpanel.siel.si [46.19.9.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DAD1687CC0 for ; Tue, 30 Jan 2024 13:43:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=norik.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=primoz.fiser@norik.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=norik.com; s=default; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject: Cc:To:From:Sender: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-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=zpK1768T2KCW81if3epyoouSZCUXHFE4GBEq18NKCHM=; b=NTkX5rg+F+78QmvYRiY/AGDXTH ZhlwExLKi3JFIVrgmVjGP5gwXsjL+HtYiHnRB/oKCyhSD87/pXGQUtQGgB07j1YR4r5FTHVHJCCTR +RYb/lYU4eJMPG0Q6i26Hnti8DbrwE0+xx3Pfmd1KQYDeYQv+3/VgZjtCDj8iBqrS5W20TbhyqrYo QmD5rrGXaqec+HkfOk56MboNCf+tEWCooJTA2GSLvNmaMbKaj1+LosFwy4PHwBYl0SaEoSOAdKdhA UQS6hz1DTEh2/xPZBjKqDK+btwB5azTy5TkDYcvQzOvkCIHsdbIlsOh4eWGSD//iJtv9iPGL2b7YN AEHJ5pIg==; Received: from [89.212.21.243] (port=40348 helo=localhost.localdomain) by cpanel.siel.si with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96.2) (envelope-from ) id 1rUnSk-00A5HC-1g; Tue, 30 Jan 2024 13:43:38 +0100 From: Primoz Fiser To: Stefano Babic , Fabio Estevam , "NXP i.MX U-Boot Team" , Tom Rini , Peng Fan , Ye Li , Jacky Bai , =?utf-8?q?S=C3=A9bastien_Szymanski?= , u-boot@lists.denx.de Cc: upstream@lists.phytec.de Subject: [PATCH] imx9: clock: Fix board_interface_eth_init for FEC Date: Tue, 30 Jan 2024 13:43:37 +0100 Message-Id: <20240130124337.497748-1-primoz.fiser@norik.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel.siel.si X-AntiAbuse: Original Domain - lists.denx.de X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - norik.com X-Get-Message-Sender-Via: cpanel.siel.si: authenticated_id: primoz.fiser@norik.com X-Authenticated-Sender: cpanel.siel.si: primoz.fiser@norik.com X-Source: X-Source-Args: X-Source-Dir: X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Commit d5eae216d833 ("net: dwc_eth_qos: Add board_interface_eth_init() for i.MX93") implemented board_interface_eth_init for i.MX9 platforms. However it only accounted for the EQOS interface while any board using FEC as primary Ethernet interface was left out as return value -EINVAL is always returned from the function in such case. Fix this by returning 0 (success) when FEC interface is primarily used instead of EQOS interface on i.MX93. Fixes: d5eae216d833 ("net: dwc_eth_qos: Add board_interface_eth_init() for i.MX93") Signed-off-by: Primoz Fiser Tested-by: Mathieu Othacehe --- arch/arm/mach-imx/imx9/clock.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/mach-imx/imx9/clock.c b/arch/arm/mach-imx/imx9/clock.c index 92c41e9a67bf..75d92af036a1 100644 --- a/arch/arm/mach-imx/imx9/clock.c +++ b/arch/arm/mach-imx/imx9/clock.c @@ -882,6 +882,11 @@ int board_interface_eth_init(struct udevice *dev, phy_interface_t interface_type device_is_compatible(dev, "nxp,imx93-dwmac-eqos")) return imx93_eqos_interface_init(dev, interface_type); + if (IS_ENABLED(CONFIG_IMX93) && + IS_ENABLED(CONFIG_FEC_MXC) && + device_is_compatible(dev, "fsl,imx93-fec")) + return 0; + return -EINVAL; }