[Letux-kernel] [PATCH RFC] w1: omap: disable iclk autoidle

Andreas Kemnade andreas at kemnade.info
Wed Oct 3 20:08:29 CEST 2018

Hi Tony,

On Mon, 1 Oct 2018 07:47:45 -0700
Tony Lindgren <tony at atomide.com> wrote:

> * Andreas Kemnade <andreas at kemnade.info> [180929 22:39]:
> > +	 * needed to disable autoidle, if system power state is too low
> > +	 * hdq transactions will not work correctly, although registers
> > +	 * are accessible.
> > +	 * According to AM/DM3730 TRM p.2879 the hwmod has to way to
> > +	 * keep iclk running during a transfer if autoidle is enabled  
> Sounds like hdq1w is not wake-up capable and the uart is blocking
> deeper SoC idle states. To me it seems that you should rather just
> use pm_qos in the hdq1w driver to block SoC idle for the duration
> of transfers.
> We had a similar problem with audio playback glitches a while
> back, see commit 9834ffd1ecc3 ("ASoC: omap-mcbsp: Add PM QoS
> support for McBSP to prevent glitches"). See how it does
> pm_qos_add_request(), pm_qos_update_request() and
> pm_qos_remove_request().

I found this interesting function:
 * _setup_iclk_autoidle - configure an IP block's interface clocks
 * @oh: struct omap_hwmod *
 * Set up the module's interface clocks.  XXX This function is still mostly
 * a stub; implementing this properly requires iclk autoidle usecounting in
 * the clock code.   No return value.
static void __init _setup_iclk_autoidle(struct omap_hwmod *oh)
        struct omap_hwmod_ocp_if *os;

        if (oh->_state != _HWMOD_STATE_INITIALIZED)

        list_for_each_entry(os, &oh->slave_ports, node) {
                if (!os->_clk)

                if (os->flags & OCPIF_SWSUP_IDLE) {
                        /* XXX omap_iclk_deny_idle(c); */
                } else {
                        /* XXX omap_iclk_allow_idle(c); */


So at first glance it looks like we just need to uncomment the first XXX
line here. But why the heck we need usecounting for the autoidle
stuff? How do I test it (if I would implement some counter)?
IMHO the clean solution for the hdq problem would be to fix this

-------------- 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/20181003/b3fff7ea/attachment.asc>

More information about the Letux-kernel mailing list