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

Andreas Kemnade andreas at kemnade.info
Sun Sep 30 09:27:03 CEST 2018


Hi,

this is superseeded by my rfc patch to the same topic which is a bit
cleaner and not that gta04-specific.

Regards,
Andreas

On Thu, 27 Sep 2018 21:38:40 +0200
Andreas Kemnade <andreas at kemnade.info> wrote:

> 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);

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20180930/7792d67e/attachment.asc>


More information about the Letux-kernel mailing list