From patchwork Fri Aug 30 10:16:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 823968 Delivered-To: patch@linaro.org Received: by 2002:a5d:48c1:0:b0:367:895a:4699 with SMTP id p1csp701066wrs; Fri, 30 Aug 2024 03:18:34 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV+M3rYr4AaRgMDbY9dSy24kXajWzaw7meg+U/+R7OQTFsPBus3xlXfOHyyDE0HxFCa57BF/g==@linaro.org X-Google-Smtp-Source: AGHT+IF6Fi5QeVg2GgXNcQkBXqfHSb7Iiqp5qS2z4qT9XpoNgznPJPcffpF0sNW3bx4Fzw2e782M X-Received: by 2002:a05:6402:274c:b0:5c0:a70a:5d09 with SMTP id 4fb4d7f45d1cf-5c21ed52ce8mr6012258a12.17.1725013114711; Fri, 30 Aug 2024 03:18:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725013114; cv=none; d=google.com; s=arc-20240605; b=L6Bwuh3xD/nAQWoWPoPtB6uQC10+yGnJbmNXY8xs+M9iGJ8jjjMDDaZpjUA6LTDOF6 V2XPN4yu1LIm326roiGN4aswjJtVG016mrRhE2ANgQjn7E+RMpcQ1Lr9/P36BsO9qxAN 4YMIVI5ZBaUXv35XjAZrKUTpXjbdHl7ArpOnotY35soZh5mQuBkA/hF8ZTv9CiF4D8vn 9eoo3A32IsLDAf0j2PfdYrlVml4R9EPhjM7ZxzwOqGrSk4s/N9Aogm/xUIMDw/vlJqgJ RqpdumKUHXyWCIfAoEOTxLrH5wKnpSAjZPMUinifFO+AyA+0JRry6ZE9nAGGrykMlQmR 9bjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EAWQNNp42XhJox51dg3EuFbQ+uZpOhCWpk6e9v5Bwts=; fh=EAnZL4IFRrLi/kZZl+bxs1QDWyO5W9ePvI/a8qBrx+4=; b=lh3qWQiVGgV/64kGHJ33JEEzrgH5IiwhJay4Nxbg2FJJkCWmNiWYHwp+7EOqSKuEPv 13lp1o2GtbZMnffFas7/Ox+O3hK1U0smK960ADEqz+amEwQXywRhMeBxTj55ftdO69P0 U2CHX0nCCHNwvOJjAFAM0OJsUopGvPoepq3bNEzj0jVdiu3JGvrq8EEGd6PU7Ti6sJ98 om71b02AOIuifG+aLOway4hAtTJc72/hVpAkiHwipsHtEunmxXtPbXqHOu4XNwpJmmtT /KeQMY1Ssgq9HHQaTDwAVsq2oxfhKg8J60vGZXkVdCPjtS5pejdmN2loxRVodxAOAnKf FkRQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tRkpNmX+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org 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 4fb4d7f45d1cf-5c22a0635dbsi2107564a12.504.2024.08.30.03.18.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Aug 2024 03:18:34 -0700 (PDT) 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=pass header.i=@linaro.org header.s=google header.b=tRkpNmX+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2C0D488A2E; Fri, 30 Aug 2024 12:17:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="tRkpNmX+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8B19788AB9; Fri, 30 Aug 2024 12:17:32 +0200 (CEST) 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_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 917B6889D1 for ; Fri, 30 Aug 2024 12:17:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jerome.forissier@linaro.org Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-37198a6da58so1302845f8f.0 for ; Fri, 30 Aug 2024 03:17:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725013050; x=1725617850; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EAWQNNp42XhJox51dg3EuFbQ+uZpOhCWpk6e9v5Bwts=; b=tRkpNmX+GDxA69/MXLJWvCS1Zq8NaI8zC0gSQwMIeyrWxRnCHSKwoAvWX3eFcWBwVg vhNW/hvMxyp6ClUaPaciJPsoJrIEPEaOWMFDkrTEwKhqo8RXg29izfcYi5Jj1b+yglq4 jkBoi5sw4rZsMSCrQ0CN20jlJbSgmD06qjefd/4nWKencnnbk11fYbksHCe2hFiCFj6F 8h/iIXR43N1sZQgOz0JZREnt+St8QCMEGWBIaDYk2T8wbQ68yck1vYQ5SSy4rSoSCXOw AaqJf7LjxYpIqDxmkTAm5fz1Uk7KM26F0x/e1P7udc9D/RNb6NaVR9lZ0vqzRpRzpVA3 eNpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725013050; x=1725617850; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EAWQNNp42XhJox51dg3EuFbQ+uZpOhCWpk6e9v5Bwts=; b=ukL3uvum7dGVjEZPQRxphsuNT+qSvReCmuwe9zTMIr5EodWVPyrOqwR0p0Zcs2JrR0 IyCTQsiyQsTh19JIryEQCbF52O5FNS/eETHfQV2tMsYEb44hNUB8gkGe3JcFyZXF5NZL EppeqlyGYk6ZaH0PMG/Ha/uy/L+8NheTFc/Ua6e59U/2qwaWv/BxzzoB/tVFJrqfWxMP qG5UCqIQ28xXKz2RYozAgcg9/1zILl69/KIYUl/1z/Y1WZ390ACSk845+aaDzKWJs79h /AEfgyqKcHQBLNozUWuvKR/EA0KdKp6mtQKUCsSjJjgtNajVSma30/08SZzn3yk70JxE lZRg== X-Gm-Message-State: AOJu0YyWiOJJCENYpyNH982Gd879LIaz6zbrfpW46RmPUhxFEXMAxFwB tKOS+Bu+f+K5LyRwQPtX4rrMS482b8Uj41GXQs3D3hhwn1WmrddZ7lxcEkm9x+PK3UFeyc8wlnN 6IqkPrw== X-Received: by 2002:adf:fd0e:0:b0:371:8c0b:4818 with SMTP id ffacd0b85a97d-3749b58afd6mr4477505f8f.63.1725013049729; Fri, 30 Aug 2024 03:17:29 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:6417:8cf6:a7f7:ee38]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-374b6a3d27fsm472728f8f.59.2024.08.30.03.17.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Aug 2024 03:17:29 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Peter Robinson , Jerome Forissier , Joe Hershberger , Ramon Fried , Tom Rini Subject: [PATCH v2 06/16] net: fm: call dtsec_init_phy() only when it is defined Date: Fri, 30 Aug 2024 12:16:49 +0200 Message-Id: <7d3aba410bc30a42540d0a18d668bf1895337b2c.1725012294.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 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 dtsec_init_phy() is defined only with MII so add the proper conditional in the caller code. Signed-off-by: Jerome Forissier Reviewed-by: Peter Robinson --- drivers/net/fm/eth.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/fm/eth.c b/drivers/net/fm/eth.c index 19f3f0fef0..22025b6a27 100644 --- a/drivers/net/fm/eth.c +++ b/drivers/net/fm/eth.c @@ -26,7 +26,8 @@ #include "fm.h" -#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) && !defined(BITBANGMII) +#if ((defined(CONFIG_MII) || defined(CONFIG_CMD_MII)) && \ + !defined(CONFIG_BITBANGMII)) #define TBIANA_SETTINGS (TBIANA_ASYMMETRIC_PAUSE | TBIANA_SYMMETRIC_PAUSE | \ TBIANA_FULL_DUPLEX) @@ -701,8 +702,11 @@ static int init_phy(struct fm_eth *fm_eth) supported |= SUPPORTED_2500baseX_Full; #endif - if (fm_eth->type == FM_ETH_1G_E) - dtsec_init_phy(fm_eth); + if ((IS_ENABLED(CONFIG_MII) || IS_ENABLED(CONFIG_CMD_MII)) && + !IS_ENABLED(CONFIG_BITBANGMII)) { + if (fm_eth->type == FM_ETH_1G_E) + dtsec_init_phy(fm_eth); + } #ifdef CONFIG_PHYLIB #ifdef CONFIG_DM_MDIO