From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 45289C43334 for ; Wed, 15 Jun 2022 23:28:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Owner; bh=9M5+QKsThxXzlhdl1gCqfwALDuLjWbZ2eDl5woGlFfU=; b=SJR5M7JDAGkTfC S5WoaQ6SWt/b5P7dcR/PCKLs+HImmpcz6xJrIAbU5eeBDOAXsvzQmCeMX/lOqEg++6yQIwKcsp15a d/pzmClKmjin73LB52H9XxK91g7jYx/dtafUwA3QN05vpWNK+FIgClhLPZV372vLSrxDQ7le3YNI/ 9nwS/vlEAWKrCCG+eRQNAejUiZbqAQmI239fl+5FP3GmWh/xteMr31x9DGjyMYnL3aNcUriS9xLZz 15x4Kz2r3M/BmdeiQM+DGJoa1aFQ5rB81HVuqZYW316cpgBCmYJwdcHHQLio/khfsHNhbsGp8obx8 dW5iK3Jqbfyij3qDPDEQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1cQS-00GuKL-Ft; Wed, 15 Jun 2022 23:27:52 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1cQP-00GuIC-6L for linux-arm-kernel@lists.infradead.org; Wed, 15 Jun 2022 23:27:51 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 92D2BB81C66; Wed, 15 Jun 2022 23:27:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7D8EC3411A; Wed, 15 Jun 2022 23:27:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655335666; bh=rNd+ed0/ZgQdjtq0ZRFbmvnuF7uSzZ+V1F5cjnwA7iQ=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=SKS7Q2bNAtb58r+0wzFHVvCiBpPJENbGnzNdyPtVpGcJdG280jgLfsmVl2MRL709R E9ts2mjzDdlffZEze7T/nEKRaRFCFimjVOcZDyZ1C7F85Ho+kAfiNJIkeTU7hbe9Fq NoUynlaR9NeTII6B5tX3iO/O4RMEC8wvve9UgCnbnQFQt7/EQr+GG49GRnMzHyBKxv CZ96jhl89RJgYbdibi8O58QPvtlTBGTcysiugMHkjWcAR/3JWjbEOr8CLuL6x1wo2o heWkCTYjlEiOmSU+2u968otODR/iwtrsU4ECpYMzzXCKG+yHYfWUSKbl4xuy4wOglx T4EXho0rTxUyg== Date: Wed, 15 Jun 2022 18:27:44 -0500 From: Bjorn Helgaas To: Richard Zhu , Lucas Stach , Rob Herring , Mark Brown , Lorenzo Pieralisi , Fabio Estevam , Francesco Dolcini Cc: linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-imx@nxp.com, Bjorn Helgaas Subject: Re: [PATCH v12 13/13] PCI: imx6: Disable clocks in reverse order of enable Message-ID: <20220615232744.GA1055943@bhelgaas> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220615231551.1054753-14-helgaas@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220615_162749_403580_A0589241 X-CRM114-Status: GOOD ( 21.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jun 15, 2022 at 06:15:51PM -0500, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > imx6_pcie_clk_enable() enables clocks in the order: > > pcie_phy > pcie_bus > pcie > imx6_pcie_enable_ref_clk > > Change imx6_pcie_clk_disable() to disable them in the reverse order. > > Signed-off-by: Bjorn Helgaas > --- > drivers/pci/controller/dwc/pci-imx6.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c > index bd736aff94a3..738b5a732cef 100644 > --- a/drivers/pci/controller/dwc/pci-imx6.c > +++ b/drivers/pci/controller/dwc/pci-imx6.c > @@ -655,10 +655,10 @@ static int imx6_pcie_clk_enable(struct imx6_pcie *imx6_pcie) > > static void imx6_pcie_clk_disable(struct imx6_pcie *imx6_pcie) > { > - clk_disable_unprepare(imx6_pcie->pcie); > - clk_disable_unprepare(imx6_pcie->pcie_phy); > - clk_disable_unprepare(imx6_pcie->pcie_bus); > imx6_pcie_disable_ref_clk(imx6_pcie); > + clk_disable_unprepare(imx6_pcie->pcie); > + clk_disable_unprepare(imx6_pcie->pcie_bus); > + clk_disable_unprepare(imx6_pcie->pcie_phy); Please comment on this. I have no actual information that this is the right thing, but normally we disable things in the reverse order that we enabled them. And the error path of imx6_pcie_deassert_core_reset() definitely disables pcie, pcie_bus, pcie_phy in that order, so it seems reasonable to do the same here. > } > > static void imx6_pcie_assert_core_reset(struct imx6_pcie *imx6_pcie) > -- > 2.25.1 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel