From patchwork Sat Oct 26 00:26:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Walle X-Patchwork-Id: 1184511 X-Patchwork-Delegate: joe.hershberger@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=walle.cc header.i=@walle.cc header.b="AGDtKCof"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 470MM91x3hz9sPc for ; Sat, 26 Oct 2019 11:30:13 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id F1FDCC21EDC; Sat, 26 Oct 2019 00:28:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 23779C21E7D; Sat, 26 Oct 2019 00:27:31 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id CE877C21EA6; Sat, 26 Oct 2019 00:27:16 +0000 (UTC) Received: from ssl.serverraum.org (ssl.serverraum.org [176.9.125.105]) by lists.denx.de (Postfix) with ESMTPS id 2FDA4C21E07 for ; Sat, 26 Oct 2019 00:27:15 +0000 (UTC) Received: from apollo.fritz.box (unknown [IPv6:2a02:810c:c200:2e91:6257:18ff:fec4:ca34]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id D98DD22F43; Sat, 26 Oct 2019 02:27:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1572049634; bh=k6WHwaheCURSZVlgyJ5cV9EQIGQdIY/9PM1g5Z+1yGA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AGDtKCofNUM795Jyq48edbOrcgS8fw5bW6qwJnBkl6fgLzu6v+NXbcyQBr+zwYKUI d+YxyhJNSaMwBug2NA3ZU0P5DuZw8sq+lNnK+/vC5lNxEbnYyVyIizbWr5uPDqU/2N nduP0+YS2xizi6cOTvi+27BC9t5dMdsyLVVGxOlU= From: Michael Walle To: u-boot@lists.denx.de Date: Sat, 26 Oct 2019 02:26:30 +0200 Message-Id: <20191026002630.25865-10-michael@walle.cc> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191026002630.25865-1-michael@walle.cc> References: <20191026002630.25865-1-michael@walle.cc> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.101.4 at web X-Virus-Status: Clean Subject: [U-Boot] [PATCH 9/9] phy: atheros: consolidate {ar8031|ar8035}_config() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" The two functions are now exactly the same, remove one of them. Signed-off-by: Michael Walle Acked-by: Joe Hershberger --- drivers/net/phy/atheros.c | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/drivers/net/phy/atheros.c b/drivers/net/phy/atheros.c index 91fcbf912a..922dc91835 100644 --- a/drivers/net/phy/atheros.c +++ b/drivers/net/phy/atheros.c @@ -241,31 +241,7 @@ static int ar803x_of_init(struct phy_device *phydev) return 0; } -static int ar8031_config(struct phy_device *phydev) -{ - int ret; - - ret = ar803x_of_init(phydev); - if (ret < 0) - return ret; - - ret = ar803x_delay_config(phydev); - if (ret < 0) - return ret; - - ret = ar803x_regs_config(phydev); - if (ret < 0) - return ret; - - phydev->supported = phydev->drv->features; - - genphy_config_aneg(phydev); - genphy_restart_aneg(phydev); - - return 0; -} - -static int ar8035_config(struct phy_device *phydev) +static int ar803x_config(struct phy_device *phydev) { int ret; @@ -304,7 +280,7 @@ static struct phy_driver AR8031_driver = { .uid = 0x4dd074, .mask = 0xffffffef, .features = PHY_GBIT_FEATURES, - .config = ar8031_config, + .config = ar803x_config, .startup = genphy_startup, .shutdown = genphy_shutdown, }; @@ -314,7 +290,7 @@ static struct phy_driver AR8035_driver = { .uid = 0x4dd072, .mask = 0xffffffef, .features = PHY_GBIT_FEATURES, - .config = ar8035_config, + .config = ar803x_config, .startup = genphy_startup, .shutdown = genphy_shutdown, };