[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220125144441.17750-2-ceggers@arri.de>
Date: Tue, 25 Jan 2022 15:44:36 +0100
From: Christian Eggers <ceggers@...i.de>
To: Abel Vesa <abel.vesa@....com>
CC: Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
NXP Linux Team <linux-imx@....com>,
<linux-clk@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>,
Stefan Riedmueller <s.riedmueller@...tec.de>, <ceggers@...i.de>
Subject: [PATCH RESEND 1/6] clk: imx6ul: disable gpmi_io clock before changing parent clock
gpmi_io clock may have been enabled by the boot loader. All children of
enfc_clk_root must be gated in order to prevent glitches during parent
change.
Signed-off-by: Christian Eggers <ceggers@...i.de>
---
drivers/clk/imx/clk-imx6ul.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/clk/imx/clk-imx6ul.c b/drivers/clk/imx/clk-imx6ul.c
index 520b100bff4b..f599ae50dd9f 100644
--- a/drivers/clk/imx/clk-imx6ul.c
+++ b/drivers/clk/imx/clk-imx6ul.c
@@ -514,6 +514,15 @@ static void __init imx6ul_clocks_init(struct device_node *ccm_node)
else if (clk_on_imx6ull())
clk_set_parent(hws[IMX6ULL_CLK_EPDC_PRE_SEL]->clk, hws[IMX6UL_CLK_PLL3_PFD2]->clk);
+ /*
+ * gpmi_io clock may have been enabled by the boot loader. All children of
+ * enfc_clk_root must be gated in order to prevent glitches during parent
+ * change. The task of re-enabling is left to the gpmi-nand driver.
+ */
+ if (clk_hw_is_enabled(hws[IMX6UL_CLK_GPMI_IO])) {
+ clk_prepare_enable(hws[IMX6UL_CLK_GPMI_IO]->clk);
+ clk_disable_unprepare(hws[IMX6UL_CLK_GPMI_IO]->clk);
+ }
clk_set_parent(hws[IMX6UL_CLK_ENFC_SEL]->clk, hws[IMX6UL_CLK_PLL2_PFD2]->clk);
}
--
Christian Eggers
Embedded software developer
Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
Sitz: Muenchen - Registergericht: Amtsgericht Muenchen - Handelsregisternummer: HRA 57918
Persoenlich haftender Gesellschafter: Arnold & Richter Cine Technik GmbH
Sitz: Muenchen - Registergericht: Amtsgericht Muenchen - Handelsregisternummer: HRB 54477
Geschaeftsfuehrer: Dr. Michael Neuhaeuser; Stephan Schenk; Walter Trauninger; Markus Zeiler
Powered by blists - more mailing lists