From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D66F1C6FD1F for ; Sun, 19 Mar 2023 17:11:12 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 78C8B85C9A; Sun, 19 Mar 2023 18:09:00 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=mailbox.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; secure) header.d=mailbox.org header.i=@mailbox.org header.b="SOQsGg9N"; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="odKlLl3i"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BC68385C86; Sun, 19 Mar 2023 18:07:31 +0100 (CET) Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [IPv6:2001:67c:2050:0:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5893785D03 for ; Sun, 19 Mar 2023 18:05:57 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.vasut+renesas@mailbox.org Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4Pfkll059Vz9sdJ; Sun, 19 Mar 2023 18:05:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1679245555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AmdNxOH7X2USgl9u/7HJx1CbSu8ql6GgwvGxRolK8GQ=; b=SOQsGg9NRA3dfg2EefmXm7w4RpAGxTiyndTlBU1pY2jxtJmSekyWQHnkf8J14sWV9mRSSB 6Lb+aRVbir8+6HLGlDs9b1U0Q7rkXB0UbdYM60AeM8ZH9+b15462tUhfT2vtrcXN3tHrMm yg99KXtaPuetV7I8zFLb/NRXFBspRC3kQvYh+MjYBgAZLLescTmjk06U51/19gpM/H59TH Z9YhuHxYq5xCnKDhepuO0/RquW0Or1nWAVtMckrF5oEXv4CkziNJqsTQMI9utI4Zum7Ysc +Kv2fqIoEYSyNCibSgj5GuDzxv5H3pe4HbioeZmcLUr7kPZXvEFA/lmSSUyZHA== From: Marek Vasut DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1679245552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AmdNxOH7X2USgl9u/7HJx1CbSu8ql6GgwvGxRolK8GQ=; b=odKlLl3ixnpOSfT+ChBpkRZ7craO0BnFSIWi72auF2mAolPpZGBmpQjOuu5lDy3k94kWmZ fOuqY+baTqmxsNq+wx/6eslLcyDY24/BaxWtoXRBtsspTkUcpvOFjyc4Vrv8NYqvHXSVTK pwFa3waqVFLaD9owenXtM7uBDR6x0nMV04lDl06TPaeLRksszMJHByf1EGkHaqGOztSzFn tFJTz5g+HltmhFj8L9u0j6Cgq1u6tVlSHZFx85ZgNE3djppzuAxiA3Gz1/4nCme63O5YDU rPWWUQOUWr5yMnAzg4VWZIFmCKED8xky8P6V8Nj0FdtgmvUERp1l0abl5WqMcQ== To: u-boot@lists.denx.de Cc: Marek Vasut , "Ariel D'Alessandro" , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Alex Nemirovsky , Haolin Li , Heinrich Schuchardt , Joe Hershberger , Joel Stanley , Josua Mayer , Michael Trimarchi , Michal Simek , Nate Drude , Neil Armstrong , Radu Pirea , Ramon Fried , Samuel Mendoza-Jonas , Stefan Roese , T Karthik Reddy , Tim Harvey , Vladimir Oltean , u-boot-amlogic@groups.io Subject: [PATCH 41/41] net: phy: Only call phy_init() on systems needing manual relocation Date: Sun, 19 Mar 2023 18:03:17 +0100 Message-Id: <20230319170317.27711-41-marek.vasut+renesas@mailbox.org> In-Reply-To: <20230319170317.27711-1-marek.vasut+renesas@mailbox.org> References: <20230319170317.27711-1-marek.vasut+renesas@mailbox.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-MBO-RS-ID: c44e790ae0186e0d91f X-MBO-RS-META: ee6tyi1f7eru5pibbskfisp1h6om311n X-Rspamd-Queue-Id: 4Pfkll059Vz9sdJ 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 The phy_init() is now used only to perform manual relocation of PHY driver callbacks. Wrap it in ifdeffery and only call it on systems which still require manual relocation, i.e. m68k . Signed-off-by: Marek Vasut --- Cc: "Ariel D'Alessandro" Cc: "Cédric Le Goater" Cc: "Marek Behún" Cc: Alex Nemirovsky Cc: Haolin Li Cc: Heinrich Schuchardt Cc: Joe Hershberger Cc: Joel Stanley Cc: Josua Mayer Cc: Marek Vasut Cc: Michael Trimarchi Cc: Michal Simek Cc: Nate Drude Cc: Neil Armstrong Cc: Radu Pirea Cc: Ramon Fried Cc: Samuel Mendoza-Jonas Cc: Stefan Roese Cc: T Karthik Reddy Cc: Tim Harvey Cc: Vladimir Oltean Cc: u-boot-amlogic@groups.io --- drivers/net/phy/phy.c | 4 ++-- net/eth_common.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 61603f28179..9b0e497f223 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -463,9 +463,9 @@ U_BOOT_PHY_DRIVER(genphy) = { .shutdown = genphy_shutdown, }; +#ifdef CONFIG_NEEDS_MANUAL_RELOC int phy_init(void) { -#ifdef CONFIG_NEEDS_MANUAL_RELOC const int ll_n_ents = ll_entry_count(struct phy_driver, phy_driver); struct phy_driver *drv, *ll_entry; @@ -489,10 +489,10 @@ int phy_init(void) if (drv->write_mmd) drv->write_mmd += gd->reloc_off; } -#endif return 0; } +#endif int phy_set_supported(struct phy_device *phydev, u32 max_speed) { diff --git a/net/eth_common.c b/net/eth_common.c index 82d527abba6..c94a7ba6ae7 100644 --- a/net/eth_common.c +++ b/net/eth_common.c @@ -37,7 +37,7 @@ void eth_common_init(void) miiphy_init(); #endif -#ifdef CONFIG_PHYLIB +#if defined(CONFIG_NEEDS_MANUAL_RELOC) && defined(CONFIG_PHYLIB) phy_init(); #endif #endif -- 2.39.2