From: Tony Lindgren <tony@atomide.com>
To: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>,
Linux OMAP Mailing List <linux-omap@vger.kernel.org>,
linux-kernel@vger.kernel.org, narmstrong@baylibre.com,
Sekhar Nori <nsekhar@ti.com>, Tero Kristo <t-kristo@ti.com>
Subject: Re: [PATCH 1/2] clocksource: timer-ti-dm: Do not restore context on every timer enable
Date: Wed, 26 Feb 2020 09:09:39 -0800 [thread overview]
Message-ID: <20200226170939.GQ37466@atomide.com> (raw)
In-Reply-To: <20200224050753.17784-2-lokeshvutla@ti.com>
* Lokesh Vutla <lokeshvutla@ti.com> [200224 05:09]:
> omap_dm_timer_enable() restores the entire context(including counter)
> based on 2 conditions:
> - If get_context_loss_count is populated and context is lost.
> - If get_context_loss_count is not populated update unconditionally.
>
> Case2 has a side effect of updating the counter register even though
> context is not lost. When timer is configured in pwm mode, this is
> causing undesired behaviour in the pwm period. So restore context only
> if get_context_loss_count is populated and context is actually lost.
Sounds like this will break things. We have get_context_loss_count()
only on omap4 and later, and even that was only partially implemented
from what I recall.
To mee it seems the right thing to do here is to save and restore
context on CPU_CLUSTER_PM_ENTER and CPU_CLUSTER_PM_EXIT. And I'd
just get rid of the partially implemented custom calls to
get_context_loss_count().
See for example a recent patch on removing the legacy SDMA code
for CPU_CLUSTER_PM_ENTER in commit d2f924879e19 ("thermal:
ti-soc-thermal: Enable addition power management").
Then if we really need to add checks for context lost at some point,
that can be implemented via reset_control_status() returning -ENOLINK
or something similar.
Regards,
Tony
next prev parent reply other threads:[~2020-02-26 17:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-24 5:07 [PATCH 0/2] clocksource: timer-ti-dm: Misc fixes for omap dm timer Lokesh Vutla
2020-02-24 5:07 ` [PATCH 1/2] clocksource: timer-ti-dm: Do not restore context on every timer enable Lokesh Vutla
2020-02-26 17:09 ` Tony Lindgren [this message]
2020-02-24 5:07 ` [PATCH 2/2] clocksource: timer-ti-dm: Do not update counter on updating the period Lokesh Vutla
2020-02-26 17:29 ` Tony Lindgren
2020-03-19 8:47 ` [tip: timers/core] clocksource/drivers/timer-ti-dm: " tip-bot2 for Lokesh Vutla
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=20200226170939.GQ37466@atomide.com \
--to=tony@atomide.com \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=lokeshvutla@ti.com \
--cc=narmstrong@baylibre.com \
--cc=nsekhar@ti.com \
--cc=t-kristo@ti.com \
--cc=tglx@linutronix.de \
/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