From: Russ Dill <russ.dill@gmail.com> To: Dave Gerlach <d-gerlach@ti.com> Cc: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, Paul Walmsley <paul@pwsan.com>, Kevin Hilman <khilman@linaro.org>, Vaibhav Bedia <vaibhav.bedia@ti.com> Subject: Re: [PATCHv3 6/9] ARM: OMAP2+: timer: Add suspend-resume callbacks for clkevent device Date: Thu, 8 Aug 2013 00:03:54 -0700 [thread overview] Message-ID: <CA+Bv8Xau6c00ipmYFEapMnmHza3jymV8czqFuFnbr2hzGc=CcA@mail.gmail.com> (raw) In-Reply-To: <1375811376-49985-7-git-send-email-d-gerlach@ti.com> On Tue, Aug 6, 2013 at 10:49 AM, Dave Gerlach <d-gerlach@ti.com> wrote: > From: Vaibhav Bedia <vaibhav.bedia@ti.com> > > OMAP timer code registers two timers - one as clocksource > and one as clockevent. Since AM33XX has only one usable timer > in the WKUP domain one of the timers needs suspend-resume > support to restore the configuration to pre-suspend state. > > commit adc78e6 (timekeeping: Add suspend and resume > of clock event devices) introduced .suspend and .resume > callbacks for clock event devices. Leverages these > callbacks to have AM33XX clockevent timer which is > in not in WKUP domain to behave properly across system > suspend. > > Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com> > Signed-off-by: Dave Gerlach <d-gerlach@ti.com> Reviewed-by: Russ Dill <russ.dill@ti.com> > --- > arch/arm/mach-omap2/timer.c | 32 ++++++++++++++++++++++++++++++++ > 1 file changed, 32 insertions(+) > > diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c > index b37e1fc..cce5d39 100644 > --- a/arch/arm/mach-omap2/timer.c > +++ b/arch/arm/mach-omap2/timer.c > @@ -118,11 +118,43 @@ static void omap2_gp_timer_set_mode(enum clock_event_mode mode, > } > } > > +static void omap_clkevt_suspend(struct clock_event_device *unused) > +{ > + char name[10]; > + struct omap_hwmod *oh; > + > + sprintf(name, "timer%d", clkev.id); > + oh = omap_hwmod_lookup(name); > + if (!oh) > + return; > + > + __omap_dm_timer_stop(&clkev, 1, clkev.rate); > + omap_hwmod_idle(oh); > +} > + > +static void omap_clkevt_resume(struct clock_event_device *unused) > +{ > + char name[10]; > + struct omap_hwmod *oh; > + > + sprintf(name, "timer%d", clkev.id); > + oh = omap_hwmod_lookup(name); > + if (!oh) > + return; > + > + omap_hwmod_enable(oh); > + __omap_dm_timer_load_start(&clkev, > + OMAP_TIMER_CTRL_ST | OMAP_TIMER_CTRL_AR, 0, 1); > + __omap_dm_timer_int_enable(&clkev, OMAP_TIMER_INT_OVERFLOW); > +} > + > static struct clock_event_device clockevent_gpt = { > .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, > .rating = 300, > .set_next_event = omap2_gp_timer_set_next_event, > .set_mode = omap2_gp_timer_set_mode, > + .suspend = omap_clkevt_suspend, > + .resume = omap_clkevt_resume, > }; > > static struct property device_disabled = { > -- > 1.7.9.5 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-omap" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: russ.dill@gmail.com (Russ Dill) To: linux-arm-kernel@lists.infradead.org Subject: [PATCHv3 6/9] ARM: OMAP2+: timer: Add suspend-resume callbacks for clkevent device Date: Thu, 8 Aug 2013 00:03:54 -0700 [thread overview] Message-ID: <CA+Bv8Xau6c00ipmYFEapMnmHza3jymV8czqFuFnbr2hzGc=CcA@mail.gmail.com> (raw) In-Reply-To: <1375811376-49985-7-git-send-email-d-gerlach@ti.com> On Tue, Aug 6, 2013 at 10:49 AM, Dave Gerlach <d-gerlach@ti.com> wrote: > From: Vaibhav Bedia <vaibhav.bedia@ti.com> > > OMAP timer code registers two timers - one as clocksource > and one as clockevent. Since AM33XX has only one usable timer > in the WKUP domain one of the timers needs suspend-resume > support to restore the configuration to pre-suspend state. > > commit adc78e6 (timekeeping: Add suspend and resume > of clock event devices) introduced .suspend and .resume > callbacks for clock event devices. Leverages these > callbacks to have AM33XX clockevent timer which is > in not in WKUP domain to behave properly across system > suspend. > > Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com> > Signed-off-by: Dave Gerlach <d-gerlach@ti.com> Reviewed-by: Russ Dill <russ.dill@ti.com> > --- > arch/arm/mach-omap2/timer.c | 32 ++++++++++++++++++++++++++++++++ > 1 file changed, 32 insertions(+) > > diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c > index b37e1fc..cce5d39 100644 > --- a/arch/arm/mach-omap2/timer.c > +++ b/arch/arm/mach-omap2/timer.c > @@ -118,11 +118,43 @@ static void omap2_gp_timer_set_mode(enum clock_event_mode mode, > } > } > > +static void omap_clkevt_suspend(struct clock_event_device *unused) > +{ > + char name[10]; > + struct omap_hwmod *oh; > + > + sprintf(name, "timer%d", clkev.id); > + oh = omap_hwmod_lookup(name); > + if (!oh) > + return; > + > + __omap_dm_timer_stop(&clkev, 1, clkev.rate); > + omap_hwmod_idle(oh); > +} > + > +static void omap_clkevt_resume(struct clock_event_device *unused) > +{ > + char name[10]; > + struct omap_hwmod *oh; > + > + sprintf(name, "timer%d", clkev.id); > + oh = omap_hwmod_lookup(name); > + if (!oh) > + return; > + > + omap_hwmod_enable(oh); > + __omap_dm_timer_load_start(&clkev, > + OMAP_TIMER_CTRL_ST | OMAP_TIMER_CTRL_AR, 0, 1); > + __omap_dm_timer_int_enable(&clkev, OMAP_TIMER_INT_OVERFLOW); > +} > + > static struct clock_event_device clockevent_gpt = { > .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, > .rating = 300, > .set_next_event = omap2_gp_timer_set_next_event, > .set_mode = omap2_gp_timer_set_mode, > + .suspend = omap_clkevt_suspend, > + .resume = omap_clkevt_resume, > }; > > static struct property device_disabled = { > -- > 1.7.9.5 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-omap" in > the body of a message to majordomo at vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-08-08 7:03 UTC|newest] Thread overview: 212+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-08-06 17:49 [PATCHv3 0/9] ARM: OMAP2+: AM33XX: Add suspend-resume support Dave Gerlach 2013-08-06 17:49 ` Dave Gerlach 2013-08-06 17:49 ` [PATCHv3 1/9] memory: emif: Move EMIF register defines to include/linux/ Dave Gerlach 2013-08-06 17:49 ` Dave Gerlach 2013-08-08 0:48 ` Russ Dill 2013-08-08 0:48 ` Russ Dill 2013-08-08 13:35 ` Santosh Shilimkar 2013-08-08 13:35 ` Santosh Shilimkar 2013-08-12 19:32 ` Greg Kroah-Hartman 2013-08-12 19:32 ` Greg Kroah-Hartman 2013-08-12 19:33 ` Santosh Shilimkar 2013-08-12 19:33 ` Santosh Shilimkar 2013-08-06 17:49 ` [PATCHv3 2/9] ARM: OMAP2+: AM33XX: control: Add some control module registers and APIs Dave Gerlach 2013-08-06 17:49 ` Dave Gerlach 2013-08-08 0:52 ` Russ Dill 2013-08-08 0:52 ` Russ Dill 2013-08-08 13:44 ` Santosh Shilimkar 2013-08-08 13:44 ` Santosh Shilimkar 2013-08-08 16:16 ` Dave Gerlach 2013-08-08 16:16 ` Dave Gerlach 2013-08-09 5:11 ` Tony Lindgren 2013-08-09 5:11 ` Tony Lindgren 2013-08-09 20:55 ` Dave Gerlach 2013-08-09 20:55 ` Dave Gerlach 2013-08-12 7:54 ` Tony Lindgren 2013-08-12 7:54 ` Tony Lindgren 2013-08-12 19:17 ` Kevin Hilman 2013-08-12 19:17 ` Kevin Hilman 2013-08-12 21:40 ` Dave Gerlach 2013-08-12 21:40 ` Dave Gerlach 2013-08-13 14:29 ` Kevin Hilman 2013-08-13 14:29 ` Kevin Hilman 2013-08-13 15:08 ` Santosh Shilimkar 2013-08-13 15:08 ` Santosh Shilimkar 2013-08-13 16:19 ` Kevin Hilman 2013-08-13 16:19 ` Kevin Hilman 2013-08-13 18:18 ` Santosh Shilimkar 2013-08-13 18:18 ` Santosh Shilimkar 2013-08-13 18:30 ` Russ Dill 2013-08-13 18:30 ` Russ Dill 2013-08-13 18:40 ` Santosh Shilimkar 2013-08-13 18:40 ` Santosh Shilimkar 2013-08-13 19:11 ` Kevin Hilman 2013-08-13 19:11 ` Kevin Hilman 2013-08-14 17:27 ` Suman Anna 2013-08-14 17:27 ` Suman Anna 2013-08-14 19:16 ` Russ Dill 2013-08-14 19:16 ` Russ Dill 2013-08-20 23:39 ` Paul Walmsley 2013-08-20 23:39 ` Paul Walmsley 2013-08-21 17:32 ` Suman Anna 2013-08-21 17:32 ` Suman Anna 2013-08-06 17:49 ` [PATCHv3 3/9] ARM: OMAP: DTB: Update IRQ data for WKUP_M3 Dave Gerlach 2013-08-06 17:49 ` Dave Gerlach 2013-08-08 0:53 ` Russ Dill 2013-08-08 0:53 ` Russ Dill 2013-08-08 13:46 ` Santosh Shilimkar 2013-08-08 13:46 ` Santosh Shilimkar 2013-08-06 17:49 ` [PATCHv3 4/9] ARM: OMAP2+: AM33XX: Reserve memory to comply with EMIF spec Dave Gerlach 2013-08-06 17:49 ` Dave Gerlach 2013-08-08 2:30 ` Russ Dill 2013-08-08 2:30 ` Russ Dill 2013-08-08 14:19 ` Santosh Shilimkar 2013-08-08 14:19 ` Santosh Shilimkar 2013-08-08 18:16 ` Kevin Hilman 2013-08-08 18:16 ` Kevin Hilman 2013-08-08 19:31 ` Santosh Shilimkar 2013-08-08 19:31 ` Santosh Shilimkar 2013-08-08 20:05 ` Kevin Hilman 2013-08-08 20:05 ` Kevin Hilman 2013-08-08 20:11 ` Santosh Shilimkar 2013-08-08 20:11 ` Santosh Shilimkar 2013-08-09 15:11 ` Kevin Hilman 2013-08-09 15:11 ` Kevin Hilman 2013-08-09 16:25 ` Dave Gerlach 2013-08-09 16:25 ` Dave Gerlach 2013-08-06 17:49 ` [PATCHv3 5/9] ARM: OMAP2+: AM33XX: Add assembly code for PM operations Dave Gerlach 2013-08-06 17:49 ` Dave Gerlach 2013-08-08 7:02 ` Russ Dill 2013-08-08 7:02 ` Russ Dill 2013-08-08 14:50 ` Santosh Shilimkar 2013-08-08 14:50 ` Santosh Shilimkar 2013-08-08 15:16 ` Russ Dill 2013-08-08 15:16 ` Russ Dill 2013-08-08 15:22 ` Santosh Shilimkar 2013-08-08 15:22 ` Santosh Shilimkar 2013-08-08 16:03 ` Russ Dill 2013-08-08 16:03 ` Russ Dill 2013-08-19 12:54 ` Gururaja Hebbar 2013-08-19 12:54 ` Gururaja Hebbar 2013-08-19 17:51 ` Dave Gerlach 2013-08-19 17:51 ` Dave Gerlach 2013-08-06 17:49 ` [PATCHv3 6/9] ARM: OMAP2+: timer: Add suspend-resume callbacks for clkevent device Dave Gerlach 2013-08-06 17:49 ` Dave Gerlach 2013-08-08 7:03 ` Russ Dill [this message] 2013-08-08 7:03 ` Russ Dill 2013-08-08 14:23 ` Santosh Shilimkar 2013-08-08 14:23 ` Santosh Shilimkar 2013-08-08 16:09 ` Dave Gerlach 2013-08-08 16:09 ` Dave Gerlach 2013-08-08 18:25 ` Kevin Hilman 2013-08-08 18:25 ` Kevin Hilman 2013-08-08 19:49 ` Dave Gerlach 2013-08-08 19:49 ` Dave Gerlach 2013-08-06 17:49 ` [PATCHv3 7/9] ARM: OMAP: omap_device: Add APIs to enable and idle hwmods Dave Gerlach 2013-08-06 17:49 ` Dave Gerlach 2013-08-08 7:05 ` Russ Dill 2013-08-08 7:05 ` Russ Dill 2013-08-08 14:26 ` Santosh Shilimkar 2013-08-08 14:26 ` Santosh Shilimkar 2013-08-06 17:49 ` [PATCHv3 8/9] ARM: OMAP2+: AM33XX: Basic suspend resume support Dave Gerlach 2013-08-06 17:49 ` Dave Gerlach 2013-08-07 16:22 ` Nishanth Menon 2013-08-07 16:22 ` Nishanth Menon 2013-08-07 18:12 ` Dave Gerlach 2013-08-07 18:12 ` Dave Gerlach 2013-08-07 19:16 ` Nishanth Menon 2013-08-07 19:16 ` Nishanth Menon 2013-08-08 8:45 ` Russ Dill 2013-08-08 8:45 ` Russ Dill 2013-08-08 12:26 ` Nishanth Menon 2013-08-08 12:26 ` Nishanth Menon 2013-08-08 15:03 ` Santosh Shilimkar 2013-08-08 15:03 ` Santosh Shilimkar 2013-08-08 16:06 ` Dave Gerlach 2013-08-08 16:06 ` Dave Gerlach 2013-08-08 16:22 ` Nishanth Menon 2013-08-08 16:22 ` Nishanth Menon 2013-08-08 21:14 ` Kevin Hilman 2013-08-08 21:14 ` Kevin Hilman 2013-08-08 21:32 ` Nishanth Menon 2013-08-08 21:32 ` Nishanth Menon 2013-08-08 23:04 ` Kevin Hilman 2013-08-08 23:04 ` Kevin Hilman 2013-08-09 15:11 ` Nishanth Menon 2013-08-09 15:11 ` Nishanth Menon 2013-08-09 16:12 ` Kevin Hilman 2013-08-09 16:12 ` Kevin Hilman 2013-08-09 16:36 ` Nishanth Menon 2013-08-09 16:36 ` Nishanth Menon 2013-08-09 20:34 ` Kevin Hilman 2013-08-09 20:34 ` Kevin Hilman 2013-08-09 21:35 ` Nishanth Menon 2013-08-09 21:35 ` Nishanth Menon 2013-08-09 22:28 ` Russ Dill 2013-08-09 22:28 ` Russ Dill 2013-08-12 16:09 ` Kevin Hilman 2013-08-12 16:09 ` Kevin Hilman 2013-08-30 17:29 ` Vaibhav Bedia 2013-08-30 17:29 ` Vaibhav Bedia 2013-08-20 22:48 ` Paul Walmsley 2013-08-20 22:48 ` Paul Walmsley 2013-08-23 14:56 ` Dave Gerlach 2013-08-23 14:56 ` Dave Gerlach 2013-08-13 7:43 ` Russ Dill 2013-08-13 7:43 ` Russ Dill 2013-08-13 14:59 ` Kevin Hilman 2013-08-13 14:59 ` Kevin Hilman 2013-08-27 21:45 ` Kevin Hilman 2013-08-27 21:45 ` Kevin Hilman 2013-08-29 21:41 ` Dave Gerlach 2013-08-29 21:41 ` Dave Gerlach 2013-08-29 22:02 ` Kevin Hilman 2013-08-29 22:02 ` Kevin Hilman 2013-08-30 17:39 ` Vaibhav Bedia 2013-08-30 17:39 ` Vaibhav Bedia 2013-08-30 21:18 ` Kevin Hilman 2013-08-30 21:18 ` Kevin Hilman 2013-08-06 17:49 ` [PATCHv3 9/9] ARM: OMAP2+: AM33XX: Hookup AM33XX PM code into OMAP builds Dave Gerlach 2013-08-06 17:49 ` Dave Gerlach 2013-08-08 8:47 ` Russ Dill 2013-08-08 8:47 ` Russ Dill 2013-08-08 14:53 ` Santosh Shilimkar 2013-08-08 14:53 ` Santosh Shilimkar 2013-08-08 13:31 ` [PATCHv3 0/9] ARM: OMAP2+: AM33XX: Add suspend-resume support Santosh Shilimkar 2013-08-08 13:31 ` Santosh Shilimkar 2013-08-11 11:53 ` Daniel Mack 2013-08-11 11:53 ` Daniel Mack 2013-08-12 18:59 ` Dave Gerlach 2013-08-12 18:59 ` Dave Gerlach 2013-08-13 12:39 ` Daniel Mack 2013-08-13 12:39 ` Daniel Mack 2013-08-13 15:33 ` Dave Gerlach 2013-08-13 15:33 ` Dave Gerlach 2013-08-13 15:51 ` Daniel Mack 2013-08-13 15:51 ` Daniel Mack 2013-08-19 9:23 ` Gururaja Hebbar 2013-08-19 9:23 ` Gururaja Hebbar 2013-08-19 17:47 ` Dave Gerlach 2013-08-19 17:47 ` Dave Gerlach 2013-08-27 20:23 ` Kevin Hilman 2013-08-27 20:23 ` Kevin Hilman 2013-08-29 21:30 ` Dave Gerlach 2013-08-29 21:30 ` Dave Gerlach 2013-08-29 21:52 ` Kevin Hilman 2013-08-29 21:52 ` Kevin Hilman 2013-08-29 22:20 ` Dave Gerlach 2013-08-29 22:20 ` Dave Gerlach 2013-08-29 22:20 ` Kevin Hilman 2013-08-29 22:20 ` Kevin Hilman 2013-08-29 22:43 ` Russ Dill 2013-08-29 22:43 ` Russ Dill 2013-08-29 23:02 ` Kevin Hilman 2013-08-29 23:02 ` Kevin Hilman 2013-09-03 17:24 ` Dave Gerlach 2013-09-03 17:24 ` Dave Gerlach 2013-09-04 15:01 ` Kevin Hilman 2013-09-04 15:01 ` Kevin Hilman 2013-09-04 15:12 ` Russ Dill 2013-09-04 15:12 ` Russ Dill 2013-09-04 15:18 ` Kevin Hilman 2013-09-04 15:18 ` Kevin Hilman
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='CA+Bv8Xau6c00ipmYFEapMnmHza3jymV8czqFuFnbr2hzGc=CcA@mail.gmail.com' \ --to=russ.dill@gmail.com \ --cc=d-gerlach@ti.com \ --cc=khilman@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-omap@vger.kernel.org \ --cc=paul@pwsan.com \ --cc=vaibhav.bedia@ti.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: linkBe 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.