Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e7c57ecd authored by Philipp Zabel's avatar Philipp Zabel Committed by Kevin Hilman
Browse files

ARM: imx6: Initialize low-power mode early again



Since commit 9e8147bb
"ARM: imx6q: move low-power code out of clock driver"
the kernel fails to boot on i.MX6Q/D if preemption is
enabled (CONFIG_PREEMPT=y). The kernel just hangs
before the console comes up.

The above commit moved the initalization of the low-power
mode setting (enabling clocked WAIT states), which was
introduced in commit 83ae2098
"ARM: imx: correct low-power mode setting", from
imx6q_clks_init to imx6q_pm_init. Now it is called
much later, after all cores are enabled.

This patch moves the low-power mode initialization back
to imx6q_clks_init again (and to imx6sl_clks_init).

Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
Signed-off-by: default avatarKevin Hilman <khilman@linaro.org>
parent 9705e746
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -482,6 +482,9 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
	if (IS_ENABLED(CONFIG_PCI_IMX6))
		clk_set_parent(clk[lvds1_sel], clk[sata_ref]);

	/* Set initial power mode */
	imx6q_set_lpm(WAIT_CLOCKED);

	np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt");
	base = of_iomap(np, 0);
	WARN_ON(!base);
+3 −0
Original line number Diff line number Diff line
@@ -266,6 +266,9 @@ static void __init imx6sl_clocks_init(struct device_node *ccm_node)
	/* Audio-related clocks configuration */
	clk_set_parent(clks[IMX6SL_CLK_SPDIF0_SEL], clks[IMX6SL_CLK_PLL3_PFD3]);

	/* Set initial power mode */
	imx6q_set_lpm(WAIT_CLOCKED);

	np = of_find_compatible_node(NULL, NULL, "fsl,imx6sl-gpt");
	base = of_iomap(np, 0);
	WARN_ON(!base);
+0 −2
Original line number Diff line number Diff line
@@ -236,8 +236,6 @@ void __init imx6q_pm_init(void)
		regmap_update_bits(gpr, IOMUXC_GPR1, IMX6Q_GPR1_GINT,
				   IMX6Q_GPR1_GINT);

	/* Set initial power mode */
	imx6q_set_lpm(WAIT_CLOCKED);

	suspend_set_ops(&imx6q_pm_ops);
}