From patchwork Wed Jun 15 23:15:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 12883043 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 B6AFBC433EF for ; Wed, 15 Jun 2022 23:21:21 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=riiPlziBx03TXSuN1kMmSniAbUyoDVKA9jg5Eqn2K5U=; b=qbM87pnAURGVwK dVyLML8L0jHM5oVxqBQ2bB4Ek+3/nigFgcTYFlaIbw0LQcEL1eB7lTX2S1Iw8c4eNnSZXZqgFFXgS hGLIzNK4EtEoqsS6t29B6ZtzctzVTgNc4Idcdbut2h8E2x621hHnjdIvTlkIPBgi0CRBJNlK+2c4+ qbgoJ66DxRePRjm3h1U/zq8UnKprbm5wt+btmtWFay/DfRE/zjkCbknNlpLDwbvVG2WLDqhGeIBvz L+TktOrZWknei/U903g0jA1faFbhEyTSfM/obMwsVFpKzyNBIvSGcaA81FTu8FUH0cMmth9ZczqWe 5OHItYVm5yCnrHo4dhtQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1cJC-00GqlQ-Ss; Wed, 15 Jun 2022 23:20:23 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1cFS-00GoqU-Tt for linux-arm-kernel@lists.infradead.org; Wed, 15 Jun 2022 23:16:32 +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 dfw.source.kernel.org (Postfix) with ESMTPS id 5DA36619D0; Wed, 15 Jun 2022 23:16:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE6C6C3411A; Wed, 15 Jun 2022 23:16:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655334990; bh=qmixXl4n20cUaihLKiCP4FjnpbNs9/9/CtTDaEdLVsQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EGQkDnwdDQtDH1N6PcBLB4fpHzPR2/On8gbcPj2NhcvTGk+ef/F9pu/sUp/FmBaIN 6JOYX0TnW14heXNYxsnxUbmMbSB07x2LMIcPUtQACz3zQG+vnL72am625fsmkI1nJK k3xG0FOPPnm6DoqRceTUK83ALsh8hw82dq83rULL7apz5nYhH+pmUmWT1gNrDfXytC eH8Cuxo3ktaZHAVGD8kdoBwJYZH7UHDeTPVwzJN4O0zGXvka53eaB2VfoxJ/pABe3+ N0TVMmVW+wdGn53tM4TDOr/b35DvTho8V4z144qEy6Fu5+t4dgAC8fX6EXn3Usnfb/ /sE7hD+f3iEsA== 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: [PATCH v12 13/13] PCI: imx6: Disable clocks in reverse order of enable Date: Wed, 15 Jun 2022 18:15:51 -0500 Message-Id: <20220615231551.1054753-14-helgaas@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220615231551.1054753-1-helgaas@kernel.org> References: <20220615231551.1054753-1-helgaas@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220615_161631_077086_CBC5C823 X-CRM114-Status: GOOD ( 11.93 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Acked-by: Richard Zhu --- 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); } static void imx6_pcie_assert_core_reset(struct imx6_pcie *imx6_pcie)