All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: linux-omap@vger.kernel.org
Cc: paul@pwsan.com
Subject: Re: [PATCH 3/3] OMAP: hwmod: allow idle after HWMOD_INIT_NO_IDLE
Date: Wed, 13 Jan 2010 16:53:20 -0800	[thread overview]
Message-ID: <87aawhcxrz.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1262993213-19866-4-git-send-email-khilman@deeprootsystems.com> (Kevin Hilman's message of "Fri\,  8 Jan 2010 15\:26\:53 -0800")

Kevin Hilman <khilman@deeprootsystems.com> writes:

> If an omap_hwmod is setup using HWMOD_INIT_NO_IDLE flag, there is
> currently way to idle it since omap_hwmod_idle() requires the hwmod to
> be in the enabled state.
>
> This patch adds a check to omap_hwmod_idle() so if the hwmod was has
> the INIT_NO_IDLE flag, calling omap_hwmod_idle() will still succeed.
>
> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>

Retracting this patch as it is no longer necessary after recent
hwmod updates from Paul.

Kevin

> ---
>  arch/arm/mach-omap2/omap_hwmod.c |   11 ++++++++++-
>  1 files changed, 10 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
> index 307deea..2de4cc3 100644
> --- a/arch/arm/mach-omap2/omap_hwmod.c
> +++ b/arch/arm/mach-omap2/omap_hwmod.c
> @@ -869,7 +869,13 @@ static int _enable(struct omap_hwmod *oh)
>   */
>  static int _idle(struct omap_hwmod *oh)
>  {
> -	if (oh->_state != _HWMOD_STATE_ENABLED) {
> +	/*
> +	 * To idle, hwmod must be enabled, EXCEPT if hwmod was
> +	 * initialized using the INIT_NO_IDLE flag.  In this case it
> +	 * will not yet be enabled so we have to allow it to be idled.
> +	 */
> +	if ((oh->_state != _HWMOD_STATE_ENABLED) &&
> +	    !(oh->flags & HWMOD_INIT_NO_IDLE)) {
>  		WARN(1, "omap_hwmod: %s: idle state can only be entered from "
>  		     "enabled state\n", oh->name);
>  		return -EINVAL;
> @@ -884,6 +890,9 @@ static int _idle(struct omap_hwmod *oh)
>  
>  	oh->_state = _HWMOD_STATE_IDLE;
>  
> +	/* Clear init flag which should only affect first call to idle */
> +	oh->flags &= ~HWMOD_INIT_NO_IDLE;
> +
>  	return 0;
>  }
>  
> -- 
> 1.6.6.rc2.1.g42108

  reply	other threads:[~2010-01-14  0:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-08 23:26 [PATCH 0/3] misc. omap_device/omap_hwmod updates Kevin Hilman
2010-01-08 23:26 ` [PATCH 1/3] OMAP: omap_device: optionally auto-adjust device activate/deactivate latencies Kevin Hilman
2010-01-08 23:26   ` [PATCH 2/3] OMAP: hwmod: add read/write API for SYSCONFIG Kevin Hilman
2010-01-08 23:26     ` [PATCH 3/3] OMAP: hwmod: allow idle after HWMOD_INIT_NO_IDLE Kevin Hilman
2010-01-14  0:53       ` Kevin Hilman [this message]
2010-01-14  1:26     ` [PATCH 2/3] OMAP: hwmod: add read/write API for SYSCONFIG Paul Walmsley
2010-01-14 18:07       ` Kevin Hilman
2010-01-15  0:19       ` Kevin Hilman
2010-01-15 17:08         ` Paul Walmsley
2010-01-09 15:04   ` [PATCH 1/3] OMAP: omap_device: optionally auto-adjust device activate/deactivate latencies Nishanth Menon
2010-01-12  0:50     ` Kevin Hilman
2010-01-12  1:01       ` Nishanth Menon
2010-01-12  1:07         ` Kevin Hilman
2010-01-14  1:05   ` Paul Walmsley

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=87aawhcxrz.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.