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 CC798C6FD1B for ; Mon, 6 Mar 2023 14:56:41 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A167985BF1; Mon, 6 Mar 2023 15:55:49 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1678114550; bh=RLz/8jSYbeAHCLciUWd+o0zk4JEEPFUDgoJHrErv1/A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=GuBNX+ZDr1AmR5j1rIOvYf6ubzJN3aYLxbIB/NTF0l++V3zotQ3dbPNH6CuNHGm72 ceamVkcHjn4+/Hm6FwYIZayykNQP+gXa6o8O1nWmWLnZIxnZRTqAkstm5HIpTCFzna DcEJKxbgcaHgjWzjkTHBST4LvFDcrz32NYZdz7FstmqMr/inPuOV0zyY/i2UuneaCo WTje00S3z/yxdA7i5t7U5AXpLwBSxVLtLIK9iLn/DDRA7fQVzDVLqDpSIz/aQCtkH2 ojtZ9w1fa2xWfXj10dwtywj5891u5p/1+yRYlg4+FEPuhY24Jl9EekwXstX1kZBdTe n5aj7BR92c8qw== Received: from tr.lan (ip-86-49-120-218.bb.vodafone.cz [86.49.120.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id B6C2B85894; Mon, 6 Mar 2023 15:54:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1678114446; bh=RLz/8jSYbeAHCLciUWd+o0zk4JEEPFUDgoJHrErv1/A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0Xs5ViK+tvb/jAvNNwRPT8fL8NMM2EaSxw05UtIeJkoa7INpHokUsSlC0lxAbteMa SHAJHbm/FdvHVRd2iKRPkp7iL/sC8aN4H6F2pOQEJZkpf9Kz1PaTdgISz4NERDk86L dMzWz4Tx/qvIk8+rzk4SFdAp3wAHCXMjxPHtRKV+LMMSL1Jj9+38KMvHUJd3gTEnqL jbGZjMwz9ExwufqZt5Cokbca6yrq43w66t/FR8A8JRLPPMR74g6m8stUij3lVaRkvH vcyUGos630djI41iWk7ieiAVkzK6pH4SGBsi0GkDZaS1QddCbYSI4gaSFyQW3XKVDE 4BruBnWtRDhiQ== From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Simon Glass , "Ariel D'Alessandro" , "NXP i.MX U-Boot Team" , Andrey Zhizhikin , Fabio Estevam , Joe Hershberger , Lukasz Majewski , Marcel Ziswiler , Michael Trimarchi , Peng Fan , Ramon Fried , Sean Anderson , Stefano Babic , Tim Harvey , Tommaso Merciai Subject: [PATCH v4 02/14] net: Pull board_interface_eth_init() into common code Date: Mon, 6 Mar 2023 15:53:42 +0100 Message-Id: <20230306145354.7439-2-marex@denx.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230306145354.7439-1-marex@denx.de> References: <20230306145354.7439-1-marex@denx.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Move the board_interface_eth_init() into common ethernet uclass code, since this function could be shared by multiple drivers. Reviewed-by: Simon Glass Signed-off-by: Marek Vasut --- Cc: "Ariel D'Alessandro" Cc: "NXP i.MX U-Boot Team" Cc: Andrey Zhizhikin Cc: Fabio Estevam Cc: Joe Hershberger Cc: Lukasz Majewski Cc: Marcel Ziswiler Cc: Marek Vasut Cc: Michael Trimarchi Cc: Peng Fan Cc: Ramon Fried Cc: Sean Anderson Cc: Stefano Babic Cc: Tim Harvey Cc: Tommaso Merciai Cc: u-boot@lists.denx.de --- V3: New patch V4: Add RB from Simon --- drivers/net/dwc_eth_qos.c | 7 ------- net/eth-uclass.c | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c index 112deb546de..0cae2cf2064 100644 --- a/drivers/net/dwc_eth_qos.c +++ b/drivers/net/dwc_eth_qos.c @@ -1412,13 +1412,6 @@ err_free_reset_eqos: return ret; } -/* board-specific Ethernet Interface initializations. */ -__weak int board_interface_eth_init(struct udevice *dev, - phy_interface_t interface_type) -{ - return 0; -} - static int eqos_probe_resources_stm32(struct udevice *dev) { struct eqos_priv *eqos = dev_get_priv(dev); diff --git a/net/eth-uclass.c b/net/eth-uclass.c index b01a910938e..c393600fabc 100644 --- a/net/eth-uclass.c +++ b/net/eth-uclass.c @@ -49,6 +49,13 @@ struct eth_uclass_priv { /* eth_errno - This stores the most recent failure code from DM functions */ static int eth_errno; +/* board-specific Ethernet Interface initializations. */ +__weak int board_interface_eth_init(struct udevice *dev, + phy_interface_t interface_type) +{ + return 0; +} + static struct eth_uclass_priv *eth_get_uclass_priv(void) { struct uclass *uc; -- 2.39.2