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: 768062 Delivered-To: patch@linaro.org Received: by 2002:adf:ee41:0:b0:33a:e5bd:fedd with SMTP id w1csp1348246wro; Tue, 30 Jan 2024 04:43:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IEeyD8uc9ICdIV/kTQ1AucpehCkHSxR4TKmBYJEkuwYLdNqf4Bw1ul8bslS5+gqa7xRtf6V X-Received: by 2002:adf:e5c7:0:b0:33a:ef44:3e6b with SMTP id a7-20020adfe5c7000000b0033aef443e6bmr3488648wrn.10.1706618624288; Tue, 30 Jan 2024 04:43:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706618624; cv=none; d=google.com; s=arc-20160816; b=FRQi6qTU31PQV5tvdoPaj/y2kkf5QsS9O96rFtc3KmSjqYZvBOmYYnVdAvTN4yHjhG roIXNdJ+OFx7EHV+yTMZrDBHAQ1XI6yVA2Hbo9xW0YPkIk/+JwjArY+Ybx6nr6rJOIzc wTH1RTSawZourUBuIHxrzVB6AQ1K8dDUklxsnWuv/5ieyuQIk6K5USnKF/qr6P6JJR/k ekxcaDnrF9JRsFsXPz9axauY5/O84HLG5dLkpPDMbUfkr1V/v51MLFWe7IcBLMYdcPlO o/efnAZ7P1wWoqgUSCj2MEpdzEOKw8Df0Rwrzn1XMDYBUACUzyxOf4B5Q8QtHVjgjALQ M6sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=zpK1768T2KCW81if3epyoouSZCUXHFE4GBEq18NKCHM=; fh=YbMcOAlqqiu2IwjNOpLP2tNgATyj4hmpLCWh/HcqxSE=; b=NDBn/o5nV7nslUz+UQPmOPBUrBXp3UAKStkXrhrjtUFzEwhA2EUYfrf9VMX5f/Xj8R Bexc+ItFaKqaO0QHfKae66pICVwDyUCCNWnPWywoD/eQMicyvZ/vrvUwhbYWaN/yby4Z +38tqCQ+DmuzW2ypdNvoynMevXrsCmd4DFzpeGyDqDiJOM2FtcRr8oUzp/V/uWlbcHrp VLCQXWKFcK//6ZAWemvi2RcqZU/KR0vzAC5dlEOgJtRGs7Zq0viv+8VD13WvwEioWyaC huRmiJoj8Gl83zrvDgS3Tm5yzaOoEGpLqqkZGSL08V9I4UgbmcY+HiiztE2pCEtxyUjZ ZA9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@norik.com header.s=default header.b=NTkX5rg+; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id q6-20020adfab06000000b0033ae6f5a29esi3518976wrc.461.2024.01.30.04.43.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 04:43:44 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=fail header.i=@norik.com header.s=default header.b=NTkX5rg+; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de 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; }