public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@ti.com>
To: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>,
	linux-omap <linux-omap@vger.kernel.org>
Subject: hwmod, postsetup_state, omap_device and !CONFIG_PM_RUNTIME
Date: Tue, 12 Jul 2011 16:51:22 -0700	[thread overview]
Message-ID: <87bowzrrb9.fsf@ti.com> (raw)

With CONFIG_PM_RUNTIME disabled, we have a few problems due to the
current way of handling the postsetup_state of each hwmod.

The primary one is that the omap_hwmod internal startup state does not
match the omap_device internal state.  For example, with
!CONFIG_PM_RUNTIME, all the hwmods are left enabled (and the bootup
state is OMAP_HWMOD_STATE_ENABLED.)

However, omap_device doesn't know this, so the first call
omap_device_enable() will generate the noisy warnings:

omap_device_enable()
    /* Here, the omap_device default state is 0x0: UNKNOWN */
    deactivate_func -> omap_device_enable_hwmods()
        omap_hwmod_enable()
            /* WARN is hit since state is already enabled */           


A second one is where device init code is directly calling
omap_hwmod_enable()  (e.g. in omap_dm_timer_init_one()).  This code has
no way of knowing that the device was left enabled due to the
postsetup_state, so calls like this to omap_hwmod_* fail with the noisy
warnings from the hwmod core.

I haven't dug too much into how to handle this, but wanted to post this
to see if anyone has any good ideas about how to handle it.

Kevin


                 reply	other threads:[~2011-07-12 23:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bowzrrb9.fsf@ti.com \
    --to=khilman@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox