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

Commit 4b526ca5 authored by Steffen Trumtrar's avatar Steffen Trumtrar Committed by Sascha Hauer
Browse files

ARM: i.MX25: clk: parent per5_clk to AHB clock

The mxc-timer on the imx25 needs to be derived from the AHB clock.
If a bootloader reparents this clock to the ipg_clk_highfreq, which according
to the datasheet is a valid operation, the system can/will produce lockups/
freezes after some time [1].

This can be forced with code like
	while(1)
                syscall(SYS_clock_gettime, CLOCK_REALTIME, &tp);

This was already fixed with the commit
	"i.MX25 GPT clock fix: ensure correct the clock source" [2],
for 3.1-rc2, but was lost, when i.MX was converted to the common clock framework
("ARM i.MX25: implement clocks using common clock framework") [3]

[1]: http://lists.arm.linux.org.uk/lurker/message/20130129.161230.229bda17.en.html


[2]: 2012d9ca
[3]: 6bbaec56

Signed-off-by: default avatarSteffen Trumtrar <s.trumtrar@pengutronix.de>
Cc: stable@vger.kernel.org # v3.5+
Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
parent 4a3ef226
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -224,6 +224,9 @@ static int __init __mx25_clocks_init(unsigned long osc_rate)


	clk_prepare_enable(clk[emi_ahb]);
	clk_prepare_enable(clk[emi_ahb]);


	/* Clock source for gpt must be derived from AHB */
	clk_set_parent(clk[per5_sel], clk[ahb]);

	clk_register_clkdev(clk[ipg], "ipg", "imx-gpt.0");
	clk_register_clkdev(clk[ipg], "ipg", "imx-gpt.0");
	clk_register_clkdev(clk[gpt_ipg_per], "per", "imx-gpt.0");
	clk_register_clkdev(clk[gpt_ipg_per], "per", "imx-gpt.0");