linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] omap2: clockdomain: Inroduce cpu_pm notifiers for context save/restore
Date: Fri, 18 May 2018 06:54:27 -0700	[thread overview]
Message-ID: <20180518135427.GT98604@atomide.com> (raw)
In-Reply-To: <14b0d567-f0cb-72bb-2efc-b21788d9993d@ti.com>

* Tero Kristo <t-kristo@ti.com> [180518 08:41]:
> On 18/05/18 08:57, Keerthy wrote:
> > 
> > 
> > On Friday 18 May 2018 03:13 AM, Tony Lindgren wrote:
> > > * Keerthy <j-keerthy@ti.com> [180516 15:21]:
> > > > Inroduce cpu_pm notifiers for context save/restore. This will be
> > > > needed for am43xx family in case of rtc only mode with ddr in
> > > > self-refresh.
> > > ...
> > > > +static int cpu_notifier(struct notifier_block *nb, unsigned long cmd, void *v)
> > > > +{
> > > > +	switch (cmd) {
> > > > +	case CPU_CLUSTER_PM_ENTER:
> > > > +		if (enable_off_mode)
> > > > +			clkdm_save_context();
> > > > +		break;
> > > > +	case CPU_CLUSTER_PM_EXIT:
> > > > +		if (enable_off_mode)
> > > > +			clkdm_restore_context();
> > > > +		break;
> > > > +	}
> > > > +
> > > > +	return NOTIFY_OK;
> > > > +}
> > > 
> > > Can you do this too only on suspend instead of the cpu notifier?
> > > If you need to call this eventually from cpuidle also then yeah
> > > the notifier makes sense.
> > 
> > Clockdomain under omap2 does not have suspend/resume calls as its still
> > not a driver. The initial version of this patch had save/restore calls
> > directly from pm33xx-core during suspend/resume platform ops are called.
> > 
> > Are you suggesting that?
> 
> I think using cpu notifiers would help in eventual transition of this under
> drivers also, as this doesn't need any custom interfaces to be exported
> around. And, as it seems now, this is only needed for AM43xx at the moment,
> no other SoCs need this for any purpose, even if device off would be
> implemented. Only exception would be if we want to implement RTC+DDR sort of
> functionality on any other SoC.

OK thanks makes sense. Applying all these into omap-for-v4.18/soc.

Regards,

Tony

  reply	other threads:[~2018-05-18 13:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-16 15:16 [PATCH 0/4] arm: mach-omap2: clkdm/pwrdm: Save/restore context Keerthy
2018-05-16 15:16 ` [PATCH 1/4] ARM: OMAP2: Add functions to save and restore clockdomain context en-masse Keerthy
2018-05-16 15:16 ` [PATCH 2/4] omap2: clockdomain: Inroduce cpu_pm notifiers for context save/restore Keerthy
2018-05-17 21:43   ` Tony Lindgren
2018-05-18  5:57     ` Keerthy
2018-05-18  8:38       ` Tero Kristo
2018-05-18 13:54         ` Tony Lindgren [this message]
2018-05-16 15:17 ` [PATCH 3/4] ARM: OMAP2: Add functions to save and restore powerdomain context Keerthy
2018-05-16 15:17 ` [PATCH 4/4] omap2: powerdomain: Inroduce cpu_pm notifiers for context save/restore Keerthy
2018-05-17 21:45   ` Tony Lindgren
2018-05-18  4:32     ` Keerthy
2018-05-18  7:00       ` Tero Kristo
2018-05-18 13:54         ` Tony Lindgren

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=20180518135427.GT98604@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).