[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20ce8aae480ba224392ec86b279a72bd4cc0e573.camel@pengutronix.de>
Date: Wed, 13 Jul 2022 10:17:31 +0200
From: Lucas Stach <l.stach@...gutronix.de>
To: Richard Zhu <hongxing.zhu@....com>, bhelgaas@...gle.com,
robh+dt@...nel.org, broonie@...nel.org, lorenzo.pieralisi@....com,
festevam@...il.com, francesco.dolcini@...adex.com
Cc: linux-pci@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, kernel@...gutronix.de,
linux-imx@....com
Subject: Re: [PATCH v14 05/17] PCI: imx6: Factor out ref clock disable to
match enable
Am Freitag, dem 01.07.2022 um 11:25 +0800 schrieb Richard Zhu:
> From: Bjorn Helgaas <bhelgaas@...gle.com>
>
> The PCIe ref clocks are specific to different variants. The enables are
> already split out into imx6_pcie_enable_ref_clk(), but the disables were
> combined with the more generic bus/phy/pcie clock disables in
> imx6_pcie_clk_disable().
>
> Split out the variant-specific disables into imx6_pcie_disable_ref_clk() to
> match imx6_pcie_enable_ref_clk().
>
> No functional change intended.
>
> Signed-off-by: Bjorn Helgaas <bhelgaas@...gle.com>
> Acked-by: Richard Zhu <hongxing.zhu@....com>
Reviewed-by: Lucas Stach <l.stach@...gutronix.de>
> ---
> drivers/pci/controller/dwc/pci-imx6.c | 16 ++++++++++------
> 1 file changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
> index 38f208eea2d7..f458461880dc 100644
> --- a/drivers/pci/controller/dwc/pci-imx6.c
> +++ b/drivers/pci/controller/dwc/pci-imx6.c
> @@ -580,12 +580,8 @@ static int imx6_pcie_enable_ref_clk(struct imx6_pcie *imx6_pcie)
> return ret;
> }
>
> -static void imx6_pcie_clk_disable(struct imx6_pcie *imx6_pcie)
> +static void imx6_pcie_disable_ref_clk(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);
> -
> switch (imx6_pcie->drvdata->variant) {
> case IMX6SX:
> clk_disable_unprepare(imx6_pcie->pcie_inbound_axi);
> @@ -595,8 +591,8 @@ static void imx6_pcie_clk_disable(struct imx6_pcie *imx6_pcie)
> IMX7D_GPR12_PCIE_PHY_REFCLK_SEL,
> IMX7D_GPR12_PCIE_PHY_REFCLK_SEL);
> break;
> - case IMX8MQ:
> case IMX8MM:
> + case IMX8MQ:
> clk_disable_unprepare(imx6_pcie->pcie_aux);
> break;
> default:
> @@ -604,6 +600,14 @@ static void imx6_pcie_clk_disable(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);
> +}
> +
> static void imx6_pcie_assert_core_reset(struct imx6_pcie *imx6_pcie)
> {
> struct device *dev = imx6_pcie->pci->dev;
Powered by blists - more mailing lists