From patchwork Wed Feb 17 04:20:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 12090941 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64625C433DB for ; Wed, 17 Feb 2021 04:24:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 23B5D64DF3 for ; Wed, 17 Feb 2021 04:24:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231169AbhBQEYD (ORCPT ); Tue, 16 Feb 2021 23:24:03 -0500 Received: from new4-smtp.messagingengine.com ([66.111.4.230]:44405 "EHLO new4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231224AbhBQEVP (ORCPT ); Tue, 16 Feb 2021 23:21:15 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 763B3580377; Tue, 16 Feb 2021 23:20:09 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 16 Feb 2021 23:20:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=QxEMMj3Dp9DFj qxYAtIXcSZ4AlixuxTBgKzn45m1S4o=; b=Zv1TjsD6JixTxUQLR7+KV2ldmp0k7 dWfz6Q3T+/eabAN/gygQdgwe77GjcHq/WPbKUZgQtdAU0oHP3Y4wulR7qwhhKf/R e6qAyvtz1YiNX37phIKZ7bz0vYRY7sg35r2ObioVsv82XI+L29IC5W35j04uoB1i XgU5/+qNMT3/eZd1GGfBVGRByay4Pncr7fJE+0BnvIbkZn2eOiXJnLoBZxrEnsq0 YodautgslkgL7dqRizER0oDhqfGFDk6Ixqpm7FEiKuHwQ8OiJNL5MThxeVsArEDW 3mnlBRtMziT7sBtVLovuFapXpx+RLSAPDf9/Ue/Va0He47XwglSxU7nXw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=QxEMMj3Dp9DFjqxYAtIXcSZ4AlixuxTBgKzn45m1S4o=; b=htDgzHnq QEFjpNJf1TgckBXIaseY0dgZKHoooiRvz5loptxGbamcAYHeh5USB8C0Fx1DwxQe q2oZ5WxzhIQ7pF4s8KQ+oErcKOMI9y8dGDLXaTaCiC+evNbJH0CyGUUUh4FKPGEh jIV26td48NSyUBLygaPvFlYl15cYJwBidWRVjdtJByPpU7v3rXLT9IjVQ4d10slb +G/I6ELUGpWGmATqays8vKYh1lJJxt8KDSnlHJC8FyPq+rIcowcQuCutwZQbQPMd DRMBtoMteZEC88l7Hg/5L//Dsvql7FwVPvgJs/EWLfd+06ts4qLhOunHMEtPXbH8 6XXFgRy59FxdPQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrjedugdeikecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufgrmhhuvghl ucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecuggftrf grthhtvghrnhepudfhjeefvdfhgfefheetgffhieeigfefhefgvddvveefgeejheejvdfg jeehueeinecukfhppeejtddrudefhedrudegkedrudehudenucevlhhushhtvghrufhiii gvpedvnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsrghmuhgvlhesshhhohhllhgrnhgu rdhorhhg X-ME-Proxy: Received: from titanium.stl.sholland.net (70-135-148-151.lightspeed.stlsmo.sbcglobal.net [70.135.148.151]) by mail.messagingengine.com (Postfix) with ESMTPA id D22EA240064; Tue, 16 Feb 2021 23:20:08 -0500 (EST) From: Samuel Holland To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Jakub Kicinski , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Corentin Labbe Cc: Ondrej Jirman , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Samuel Holland Subject: [PATCH net-next v2 3/5] net: stmmac: dwmac-sun8i: Use reset_control_reset Date: Tue, 16 Feb 2021 22:20:04 -0600 Message-Id: <20210217042006.54559-4-samuel@sholland.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210217042006.54559-1-samuel@sholland.org> References: <20210217042006.54559-1-samuel@sholland.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Use the appropriate function instead of reimplementing it, and update the error message to match the code. Reviewed-by: Chen-Yu Tsai Signed-off-by: Samuel Holland --- drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c index 3c3d0b99d3e8c..b61f442ed3033 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c @@ -805,12 +805,12 @@ static int sun8i_dwmac_power_internal_phy(struct stmmac_priv *priv) /* Make sure the EPHY is properly reseted, as U-Boot may leave * it at deasserted state, and thus it may fail to reset EMAC. + * + * This assumes the driver has exclusive access to the EPHY reset. */ - reset_control_assert(gmac->rst_ephy); - - ret = reset_control_deassert(gmac->rst_ephy); + ret = reset_control_reset(gmac->rst_ephy); if (ret) { - dev_err(priv->device, "Cannot deassert internal phy\n"); + dev_err(priv->device, "Cannot reset internal PHY\n"); clk_disable_unprepare(gmac->ephy_clk); return ret; }