[Letux-kernel] [PATCH letux] clk: ugly hack: disable autoidle of hdq iclk.

Andreas Kemnade andreas at kemnade.info
Thu Sep 27 21:38:40 CEST 2018


hdq seems not to behave with too much stuff idling.
If booted without modules and then enable runtime
autosuspend for UART 1 and 2, hdq seems to get stuck:
If that autoidle is enabled the TRM says:"In this case,
the software must verify that all HDQ/1-Wire transfers
are complete before enabling the L4 interconnect clock
domain idle mode." No idea yet how to ensure that.
Or just use the ICLKEN register manually.
So first disable it. Hopefully a better fix will be found.
No idea which other platforms this patch will break.

Signed-off-by: Andreas Kemnade <andreas at kemnade.info>
---
 drivers/clk/ti/clkt_iclk.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/ti/clkt_iclk.c b/drivers/clk/ti/clkt_iclk.c
index 60b583d7db33..c538b02429d6 100644
--- a/drivers/clk/ti/clkt_iclk.c
+++ b/drivers/clk/ti/clkt_iclk.c
@@ -35,7 +35,9 @@ void omap2_clkt_iclk_allow_idle(struct clk_hw_omap *clk)
 
 	memcpy(&r, &clk->enable_reg, sizeof(r));
 	r.offset ^= (CM_AUTOIDLE ^ CM_ICLKEN);
-
+	/* HACK: avoid autoidle of HDQ iclk */
+	if (clk->enable_bit == 22)
+		return;	
 	v = ti_clk_ll_ops->clk_readl(&r);
 	v |= (1 << clk->enable_bit);
 	ti_clk_ll_ops->clk_writel(v, &r);
-- 
2.11.0



More information about the Letux-kernel mailing list