From patchwork Wed Jun 15 23:15:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 12883025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 716AEC433EF for ; Wed, 15 Jun 2022 23:16:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355709AbiFOXQn (ORCPT ); Wed, 15 Jun 2022 19:16:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352209AbiFOXQY (ORCPT ); Wed, 15 Jun 2022 19:16:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48E36326D8; Wed, 15 Jun 2022 16:16:21 -0700 (PDT) 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 9C117619A2; Wed, 15 Jun 2022 23:16:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD2A2C3411E; Wed, 15 Jun 2022 23:16:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655334980; bh=3cLKaeAlo+Sy59tfNtk5xZLRjzRekSFYTs9v6gKNT0M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SXqrIsZbTzwVX9omCBijrvdwVv+sidwhOqu9nrSWnDvrBGSJCsPU9U5fRmiASUvbC 2rjGpSrMekg2FAsVU/Ocfe5VuTuqczVL3g0VTbxQVyG0hAT31IryBdqnXIol36fvU7 F3qYxauFNVQZg4wXBEkBMMvoJ8NzNqztJZq/JDJqjvk+e8RgA/ZFsVjYleYHVmzYn7 naYr41KowLJzU0LJjJ56lvuIRnyr+R3MnkOszBuJnNFp8PMbxXUqrcFz5rEXArpI0P 6PBArsBDXEiKQVYY2wuXu+/ZImONal62PJT4XII3XW4HNyBJC6QzzQcEGNaI9Boqca 8cCkhX2cormrw== 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 08/13] PCI: imx6: Disable i.MX6QDL clock when disabling ref clocks Date: Wed, 15 Jun 2022 18:15:46 -0500 Message-Id: <20220615231551.1054753-9-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 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Richard Zhu When disabling PCIe clocks, disable i.MX6QDL ref clock too. Link: https://lore.kernel.org/r/1655189942-12678-5-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Bjorn Helgaas Reviewed-by: Lucas Stach --- drivers/pci/controller/dwc/pci-imx6.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 90ab9397a935..6eddd0b5f628 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -586,6 +586,14 @@ static void imx6_pcie_disable_ref_clk(struct imx6_pcie *imx6_pcie) case IMX6SX: clk_disable_unprepare(imx6_pcie->pcie_inbound_axi); break; + case IMX6QP: + case IMX6Q: + regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1, + IMX6Q_GPR1_PCIE_REF_CLK_EN, 0); + regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1, + IMX6Q_GPR1_PCIE_TEST_PD, + IMX6Q_GPR1_PCIE_TEST_PD); + break; case IMX7D: regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR12, IMX7D_GPR12_PCIE_PHY_REFCLK_SEL,