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 4E211C61DA4 for ; Sat, 11 Feb 2023 21:48:20 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4475C856B7; Sat, 11 Feb 2023 22:47:57 +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=1676152077; bh=I+N44vvXGhaiv4pbDe2ZeWQa4r2J6tnwxoc08y8+rwc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=PFOnmj/h3YCKmx0VJ7X1qbtJs7shQcBXj3bO/oYpBNG1NT5KkwaxC2d8y1vGDC+Vs fSYu99vJnVXogHnFIiS9xtk711hTc30+YvuY5KXBP7+qFv90Ik+EAjWDmMMXAmXVOV PgngYWps766xFthVN42/KNiYFlmoxhoLglH/DcVH3Ej9hFFck810divnhkcREtnUZX SWMIDw8X5371HHwHgpCpk2pH+JnSrntAWRBZgv3d+TPM8Co5o3rR6jrLG8GIfa2faM UDq81kmQi5dTf8A4zWLrLhO6GmT91SyRC3cuUrgqsBxaol1FNJ7+tnYCtq67BTFZF7 dSG/vhiDCvZWQ== 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 B6F9D8562C; Sat, 11 Feb 2023 22:47:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1676152071; bh=I+N44vvXGhaiv4pbDe2ZeWQa4r2J6tnwxoc08y8+rwc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=By+PaVuqjYfXYCjPLVryy8khXOnl95dSK7pPZiMkLVf54iOF5adPeY2LfhpzvcFnh oRXKXGniBcdXXhgvH8kk4aTi4ozd2Tij7oEQd6eN0lx9r7mf5TkczWuo7SeX4Jyisu 8ChPbmYkldBH0av/a7U8cVmU1KlmsxRahATVkAHR+WhMLRk84N1cYRqFHjFZB1+B7s UtFi4lzq2gfhmMQPZeSUjKWTeYpdp7BjlTrpm8EGFGE06Uw0I83CPVWtL+t2SdDij3 Fei2qX949dEGPz8fv/DxN6JQyUVVxF+YhUSxVReTc1q6etQxf4g5niW+mIQEH74l5Z og1qo4F7yBHbg== From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , "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 v3 02/14] net: Pull board_interface_eth_init() into common code Date: Sat, 11 Feb 2023 22:47:17 +0100 Message-Id: <20230211214729.478566-2-marex@denx.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230211214729.478566-1-marex@denx.de> References: <20230211214729.478566-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.6 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. 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 --- 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.1