public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: tony@atomide•com (Tony Lindgren)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] ARM: OMAP2+: Fix dmtimer set source clock failure
Date: Tue, 7 Aug 2012 23:47:22 -0700	[thread overview]
Message-ID: <20120808064722.GB11011@atomide.com> (raw)
In-Reply-To: <87boim36mj.fsf@ti.com>

* Kevin Hilman <khilman@ti•com> [120807 11:21]:
> Jon Hunter <jon-hunter@ti•com> writes:
> 
> > Calling the dmtimer function omap_dm_timer_set_source() fails if following a
> > call to pm_runtime_put() to disable the timer. For example the following
> > sequence would fail to set the parent clock ...
> >
> > 	omap_dm_timer_stop(gptimer);
> > 	omap_dm_timer_set_source(gptimer, OMAP_TIMER_SRC_32_KHZ);
> >
> > The following error message would be seen ...
> >
> > omap_dm_timer_set_source: failed to set timer_32k_ck as parent
> >
> > The problem is that, by design, pm_runtime_put() simply decrements the usage
> > count and returns before the timer has actually been disabled. Therefore,
> > setting the parent clock failed because the timer was still active when the
> > trying to set the parent clock. Setting a parent clock will fail if the clock
> > you are setting the parent of has a non-zero usage count. To ensure that this
> > does not fail use pm_runtime_put_sync() when disabling the timer.
> >
> > Note that this will not be seen on OMAP1 devices, because these devices do
> > not use the clock framework for dmtimers.
> >
> > Signed-off-by: Jon Hunter <jon-hunter@ti•com>
> 
> Acked-by: Kevin Hilman <khilman@ti•com>

Thanks applying into fixes with Cc stable.

Tony

  reply	other threads:[~2012-08-08  6:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-13 20:12 [PATCH] ARM: OMAP2+: Fix dmtimer set source clock failure Jon Hunter
2012-08-07  7:34 ` Tony Lindgren
2012-08-07 18:21 ` Kevin Hilman
2012-08-08  6:47   ` Tony Lindgren [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-07-13 20:10 Jon Hunter

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=20120808064722.GB11011@atomide.com \
    --to=tony@atomide$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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