Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9128155pxu; Mon, 28 Dec 2020 07:18:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJw33sfAs4fx9qOUEhJMHTZXXuUPtzRsuy/WVpKA73CdpygL5ahC25ucLW0hk4VpReTtAXEQ X-Received: by 2002:a17:907:2061:: with SMTP id qp1mr40747276ejb.222.1609168707456; Mon, 28 Dec 2020 07:18:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609168707; cv=none; d=google.com; s=arc-20160816; b=wIQpESW/2yKaL3UKY4SlpoiFNT4BXTW26bfzm2kS4dguDwPJT8smc3whsj45jjV1c+ cOD8uqANW0kJmxT3DZo4Fik1tBzlswPHQsa+RCHpRxGR2AiMqllLDhZVMPjdCP030Fv+ uBcF2x/DnQZaY86MwXPMYnWGHH0wIWNgdc2npzI4+2a1t3G2rg1irTMCsJIkPLeHxCxo of2WHtTlO2oHw51RfItnKpZb/yRW+/sLvZiIxHBKcBo2cWyEXX239G84iv7iRZsJ7Xth 8xg34HSwY2L9lni6QLFDlfsLCv2RwltxHLytYxY6d9VpJJVE7TIzJRD3U8KiAsnim2/m x+yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CCO6Q92qew44a9SvkvDLhGOeCvBbGAw+P+nEbmc4sqY=; b=FEp7r7NS57a2Uxw6WMhqU7QsFWhHO/DBcO51O3QC8yaVSaCQB1pdceS6nQ3hsjmIX6 duH8brKlsgYh1OspslhR3vUL+rk4MgqEe0fTmm2paVUlKzKP1UHrI39CHBt51SUfLHQN 4EIok3+Uc2Txpw5S831BZaay3jbeksjRceJbHyW4ixuljLfxo1UU/5K3OQoVUcXpwyZD 73geCwB87Fdl/8mbLktSy3YTD4P2eASOxhXzDbvQpYqVl8TtqWhGjthgmcE5R8cFk9fW TOCOPSDI+sEAXo4M93jqzNC3qW5MOmyfRIfG05ZJvJPuwsYYTCGXuJRGTIhs2sG5ccwS plog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PXBIQnoi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k7si18387602ejg.677.2020.12.28.07.18.03; Mon, 28 Dec 2020 07:18:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PXBIQnoi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437394AbgL1OEf (ORCPT + 99 others); Mon, 28 Dec 2020 09:04:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:38804 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437372AbgL1OEb (ORCPT ); Mon, 28 Dec 2020 09:04:31 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id F0B5D207A9; Mon, 28 Dec 2020 14:03:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164231; bh=rsdvLYRZgFKBGP3ZyoaXO42+9Er236h7+jdmEVgjGsk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PXBIQnoiDwO8T0w+rq9WMrPlZWDcN5iN7BXN+OI+7hSbzxMyBe5j8R5ZrQI0p0T/s 7u2+R3f9Y2YGvf0Per4Y/Rm1THqx35tNxrs7GNd7rlmotcGAgzE7thtWlmNmlNPRSv gi1zqqThrbLxm4wGTQsTHWmeZvFKGWW1q5ZBoZKg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tony Lindgren , Sasha Levin Subject: [PATCH 5.10 106/717] soc: ti: omap-prm: Do not check rstst bit on deassert if already deasserted Date: Mon, 28 Dec 2020 13:41:44 +0100 Message-Id: <20201228125026.034153545@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tony Lindgren [ Upstream commit c1995e5afaf6abf3922b5395ad1f4096951e3276 ] If a rstctrl reset bit is already deasserted, we can just bail out early not wait for rstst to clear. Otherwise we can have deassert fail for already deasserted resets. Fixes: c5117a78dd88 ("soc: ti: omap-prm: poll for reset complete during de-assert") Signed-off-by: Tony Lindgren Signed-off-by: Sasha Levin --- drivers/soc/ti/omap_prm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/soc/ti/omap_prm.c b/drivers/soc/ti/omap_prm.c index 980b04c38fd94..4d41dc3cdce1f 100644 --- a/drivers/soc/ti/omap_prm.c +++ b/drivers/soc/ti/omap_prm.c @@ -484,6 +484,10 @@ static int omap_reset_deassert(struct reset_controller_dev *rcdev, struct ti_prm_platform_data *pdata = dev_get_platdata(reset->dev); int ret = 0; + /* Nothing to do if the reset is already deasserted */ + if (!omap_reset_status(rcdev, id)) + return 0; + has_rstst = reset->prm->data->rstst || (reset->prm->data->flags & OMAP_PRM_HAS_RSTST); -- 2.27.0