linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* query about _setup() in omap_hwmod.c
@ 2012-04-11  9:37 Archit Taneja
  2012-04-13  8:09 ` Paul Walmsley
  0 siblings, 1 reply; 6+ messages in thread
From: Archit Taneja @ 2012-04-11  9:37 UTC (permalink / raw)
  To: Benoit Cousson, paul@pwsan.com; +Cc: linux-omap@vger.kernel.org

Hi,

I had a query about the _setup() function in 
arch/arm/mach-omap2/omap_hwmod.c:

The function enables slave clocks right in the beginning, and based on 
the value of postsetup_state, it either calls _idle(), _shutdown() or 
does nothing.

Now, for the case of _idle() or _shutdown(), I guess it's the job of 
_disable_clocks() to disable the slave clocks before we exit _setup().

If we compare how the slave clocks are enabled and disabled in _setup() 
and _disable_clocks() respectively:

static int _setup(struct omap_hwmod *oh, void *data)
{
	...
	...
	if (os->flags & OCPIF_SWSUP_IDLE) {
                                 /* XXX omap_iclk_deny_idle(c); */
                         } else {
                                 /* XXX omap_iclk_allow_idle(c); */
                                 clk_enable(c);
                         }
	}
	...
	...
}

static int _disable_clocks(struct omap_hwmod *oh)
{
	...
	...
	if (c && (os->flags & OCPIF_SWSUP_IDLE))
		clk_disable(c);
	...
	...
}

Both these functions are taking different decisions based on whether 
os->flags has OCPIF_SWSUP_IDLE or not.

Would this lead to some sort of clk_enable() and clk_disable() mismatch?

If I boot a 3.4-rc1 kernel on beagle with omap2plus_defconfig, I get:

cat /sys/kernel/debug/clock/summary | grep dss

name                parent              freq     use_count
dss_ick                        l4_ick                 83000000   4
dss2_alwon_fck                 sys_ck                 13000000   0
dss_96m_fck                    omap_96m_fck           96000000   0
dss_tv_fck                     omap_54m_fck           54000000   0
dss1_alwon_fck                 dpll4_m4x2_ck          144000000  0

dss_ick is the slave clock of all the dss hwmods on omap3. This doesn't 
seem to be right, does it?

Thanks,
Archit

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-04-13  8:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-11  9:37 query about _setup() in omap_hwmod.c Archit Taneja
2012-04-13  8:09 ` Paul Walmsley
2012-04-13  8:21   ` Archit Taneja
2012-04-13  8:35     ` Cousson, Benoit
2012-04-13  8:39     ` Paul Walmsley
2012-04-13  8:52       ` Archit Taneja

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).