From: "Bedia, Vaibhav" <vaibhav.bedia@ti.com> To: "Shilimkar, Santosh" <santosh.shilimkar@ti.com> Cc: "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>, "Hilman, Kevin" <khilman@ti.com>, "paul@pwsan.com" <paul@pwsan.com>, "Cousson, Benoit" <b-cousson@ti.com>, "tony@atomide.com" <tony@atomide.com>, "Hiremath, Vaibhav" <hvaibhav@ti.com> Subject: RE: [PATCH 12/15] ARM: OMAP: timer: Add suspend-resume callbacks for clockevent device Date: Sun, 4 Nov 2012 15:25:57 +0000 [thread overview] Message-ID: <B5906170F1614E41A8A28DE3B8D121433EBFFD03@DBDE01.ent.ti.com> (raw) In-Reply-To: <50953DA4.10008@ti.com> Hi Santosh, On Sat, Nov 03, 2012 at 21:22:04, Shilimkar, Santosh wrote: > On Friday 02 November 2012 06:02 PM, Vaibhav Bedia wrote: > > From: Vaibhav Hiremath <hvaibhav@ti.com> > > > > The current OMAP timer code registers two timers - > > one as clocksource and one as clockevent. > Actually OMAP also uses only one timer. The clocksource > is taken care by 32K syntimer till OMAP4 and by realtime > counter on OMAP5. There is a clocksource registration of > timer is available but that is not being used in systems. > Yes, I guess the changelog should mention that AM33xx does not have the 32k synctimer. I'll also add in the OMAP details that you pointed out so that all the details get captured. > > AM33XX has only one usable timer in the WKUP domain > > so 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. > > > So you use WKUP domain timer for clocksource and PER > domain one for clock-event ? Yes, that's correct. > > > > Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com> > > Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com> > > --- > > arch/arm/mach-omap2/timer.c | 31 +++++++++++++++++++++++++++++++ > > 1 files changed, 31 insertions(+), 0 deletions(-) > > > > diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c > > index 6584ee0..e8781fd 100644 > > --- a/arch/arm/mach-omap2/timer.c > > +++ b/arch/arm/mach-omap2/timer.c > > @@ -135,6 +135,35 @@ 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", 2); > > + oh = omap_hwmod_lookup(name); > > + if (!oh) > > + return; > > You can move all the look up stuff in init code and then > suspend resume hooks will be cleaner. Will do. Kevin also pointed this out. > > + > > + 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", 2); > > + 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); > > +} > > + > OK. So since your clk_event stops when PER idles, how do you plan > to support the SOC idle. For CPUIDLE path, you need your clock-event > to wakeup the system based on next timer expiry. So you need your > clock event to be active. Indirectly, you can't let PER idle which > leads npo CORE idle->SOC idle. > > How do you plan to address this ? Os is SOC idle is not suppose > to be added for AMXXX ? > We can't really have SOC idle on AM33xx or at least that's what I think. The deepest that we should be able to support is MPU off with external memory in self-refresh mode. I mentioned the reasons for that in the reply to Kevin [1]. If there's any another approach that we could take that would be great to know. Regards, Vaibhav [1] http://marc.info/?l=linux-arm-kernel&m=135195053104053&w=2
WARNING: multiple messages have this Message-ID (diff)
From: vaibhav.bedia@ti.com (Bedia, Vaibhav) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 12/15] ARM: OMAP: timer: Add suspend-resume callbacks for clockevent device Date: Sun, 4 Nov 2012 15:25:57 +0000 [thread overview] Message-ID: <B5906170F1614E41A8A28DE3B8D121433EBFFD03@DBDE01.ent.ti.com> (raw) In-Reply-To: <50953DA4.10008@ti.com> Hi Santosh, On Sat, Nov 03, 2012 at 21:22:04, Shilimkar, Santosh wrote: > On Friday 02 November 2012 06:02 PM, Vaibhav Bedia wrote: > > From: Vaibhav Hiremath <hvaibhav@ti.com> > > > > The current OMAP timer code registers two timers - > > one as clocksource and one as clockevent. > Actually OMAP also uses only one timer. The clocksource > is taken care by 32K syntimer till OMAP4 and by realtime > counter on OMAP5. There is a clocksource registration of > timer is available but that is not being used in systems. > Yes, I guess the changelog should mention that AM33xx does not have the 32k synctimer. I'll also add in the OMAP details that you pointed out so that all the details get captured. > > AM33XX has only one usable timer in the WKUP domain > > so 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. > > > So you use WKUP domain timer for clocksource and PER > domain one for clock-event ? Yes, that's correct. > > > > Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com> > > Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com> > > --- > > arch/arm/mach-omap2/timer.c | 31 +++++++++++++++++++++++++++++++ > > 1 files changed, 31 insertions(+), 0 deletions(-) > > > > diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c > > index 6584ee0..e8781fd 100644 > > --- a/arch/arm/mach-omap2/timer.c > > +++ b/arch/arm/mach-omap2/timer.c > > @@ -135,6 +135,35 @@ 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", 2); > > + oh = omap_hwmod_lookup(name); > > + if (!oh) > > + return; > > You can move all the look up stuff in init code and then > suspend resume hooks will be cleaner. Will do. Kevin also pointed this out. > > + > > + 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", 2); > > + 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); > > +} > > + > OK. So since your clk_event stops when PER idles, how do you plan > to support the SOC idle. For CPUIDLE path, you need your clock-event > to wakeup the system based on next timer expiry. So you need your > clock event to be active. Indirectly, you can't let PER idle which > leads npo CORE idle->SOC idle. > > How do you plan to address this ? Os is SOC idle is not suppose > to be added for AMXXX ? > We can't really have SOC idle on AM33xx or at least that's what I think. The deepest that we should be able to support is MPU off with external memory in self-refresh mode. I mentioned the reasons for that in the reply to Kevin [1]. If there's any another approach that we could take that would be great to know. Regards, Vaibhav [1] http://marc.info/?l=linux-arm-kernel&m=135195053104053&w=2
next prev parent reply other threads:[~2012-11-04 15:26 UTC|newest] Thread overview: 218+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-11-02 12:32 [RFC 00/15] Add basic suspend-resume support for AM33XX Vaibhav Bedia 2012-11-02 12:32 ` Vaibhav Bedia 2012-11-02 12:32 ` [PATCH 01/15] ARM: OMAP2+: mailbox: Add an API for flushing the FIFO Vaibhav Bedia 2012-11-02 12:32 ` Vaibhav Bedia 2012-11-02 19:00 ` Tony Lindgren 2012-11-02 19:00 ` Tony Lindgren 2012-11-03 8:24 ` Bedia, Vaibhav 2012-11-03 8:24 ` Bedia, Vaibhav 2012-11-03 16:03 ` Santosh Shilimkar 2012-11-03 16:03 ` Santosh Shilimkar 2012-11-04 15:26 ` Bedia, Vaibhav 2012-11-04 15:26 ` Bedia, Vaibhav 2012-11-05 14:59 ` Santosh Shilimkar 2012-11-05 14:59 ` Santosh Shilimkar 2012-11-02 12:32 ` [PATCH 02/15] ARM: OMAP2+: mailbox: Add support for AM33XX Vaibhav Bedia 2012-11-02 12:32 ` Vaibhav Bedia 2012-11-03 0:14 ` Russ Dill 2012-11-03 0:14 ` Russ Dill 2012-11-03 8:39 ` Bedia, Vaibhav 2012-11-03 8:39 ` Bedia, Vaibhav 2012-11-03 13:48 ` Bedia, Vaibhav 2012-11-03 13:48 ` Bedia, Vaibhav 2012-11-03 16:10 ` Santosh Shilimkar 2012-11-03 16:10 ` Santosh Shilimkar 2012-11-04 15:26 ` Bedia, Vaibhav 2012-11-04 15:26 ` Bedia, Vaibhav 2012-11-05 15:00 ` Santosh Shilimkar 2012-11-05 15:00 ` Santosh Shilimkar 2012-11-02 12:32 ` [PATCH 03/15] ARM: OMAP: mailbox: Convert to device_initcall Vaibhav Bedia 2012-11-02 12:32 ` Vaibhav Bedia 2012-11-03 16:12 ` Santosh Shilimkar 2012-11-03 16:12 ` Santosh Shilimkar 2012-11-02 12:32 ` [PATCH 04/15] ARM: OMAP2+: hwmod: Update the reset API for AM33XX Vaibhav Bedia 2012-11-02 12:32 ` Vaibhav Bedia 2012-11-05 6:58 ` Vaibhav Hiremath 2012-11-05 6:58 ` Vaibhav Hiremath 2012-11-05 17:57 ` Bedia, Vaibhav 2012-11-05 17:57 ` Bedia, Vaibhav 2012-11-06 6:06 ` Hiremath, Vaibhav 2012-11-06 6:06 ` Hiremath, Vaibhav 2012-11-06 7:19 ` Bedia, Vaibhav 2012-11-06 7:19 ` Bedia, Vaibhav 2012-11-02 12:32 ` [PATCH 05/15] ARM: OMAP2+: AM33XX: Update WKUP_M3 hwmod entry for reset status Vaibhav Bedia 2012-11-02 12:32 ` Vaibhav Bedia 2012-11-03 16:15 ` Santosh Shilimkar 2012-11-03 16:15 ` Santosh Shilimkar 2012-11-04 15:26 ` Bedia, Vaibhav 2012-11-04 15:26 ` Bedia, Vaibhav 2012-11-05 6:59 ` Vaibhav Hiremath 2012-11-05 6:59 ` Vaibhav Hiremath 2012-11-02 12:32 ` [PATCH 06/15] ARM: OMAP2+: hwmod: Enable OCMCRAM registration in AM33XX Vaibhav Bedia 2012-11-02 12:32 ` Vaibhav Bedia 2012-11-03 16:16 ` Santosh Shilimkar 2012-11-03 16:16 ` Santosh Shilimkar 2012-11-04 15:26 ` Bedia, Vaibhav 2012-11-04 15:26 ` Bedia, Vaibhav 2012-11-05 7:23 ` Vaibhav Hiremath 2012-11-05 7:23 ` Vaibhav Hiremath 2012-11-05 17:57 ` Bedia, Vaibhav 2012-11-05 17:57 ` Bedia, Vaibhav 2012-11-06 6:07 ` Hiremath, Vaibhav 2012-11-06 6:07 ` Hiremath, Vaibhav 2012-11-02 12:32 ` [PATCH 07/15] ARM: OMAP2+: hwmod: Update the hwmod data for TPTCs " Vaibhav Bedia 2012-11-02 12:32 ` Vaibhav Bedia 2012-11-05 7:19 ` Vaibhav Hiremath 2012-11-05 7:19 ` Vaibhav Hiremath 2012-11-02 12:32 ` [PATCH 08/15] ARM: OMAP2+: hwmod: Fix the omap_hwmod_addr_space for CPGMAC0 Vaibhav Bedia 2012-11-02 12:32 ` Vaibhav Bedia 2012-11-03 16:18 ` Santosh Shilimkar 2012-11-03 16:18 ` Santosh Shilimkar 2012-11-04 15:26 ` Bedia, Vaibhav 2012-11-04 15:26 ` Bedia, Vaibhav 2012-11-05 9:10 ` Bedia, Vaibhav 2012-11-05 9:10 ` Bedia, Vaibhav 2012-11-06 9:29 ` Vaibhav Hiremath 2012-11-06 9:29 ` Vaibhav Hiremath 2012-11-06 10:09 ` Bedia, Vaibhav 2012-11-06 10:09 ` Bedia, Vaibhav 2012-11-06 13:08 ` Hiremath, Vaibhav 2012-11-06 13:08 ` Hiremath, Vaibhav 2012-11-06 13:46 ` Bedia, Vaibhav 2012-11-06 13:46 ` Bedia, Vaibhav 2012-11-06 13:50 ` Benoit Cousson 2012-11-06 13:50 ` Benoit Cousson 2012-11-06 13:56 ` Bedia, Vaibhav 2012-11-06 13:56 ` Bedia, Vaibhav 2012-11-02 12:32 ` [PATCH 09/15] ARM: OMAP: AM33XX: Remove unnecessary include and use __ASSEMBLER__ macros Vaibhav Bedia 2012-11-02 12:32 ` Vaibhav Bedia 2012-11-03 16:29 ` Santosh Shilimkar 2012-11-03 16:29 ` Santosh Shilimkar 2012-11-04 15:26 ` Bedia, Vaibhav 2012-11-04 15:26 ` Bedia, Vaibhav 2012-11-02 12:32 ` [PATCH 10/15] ARM: OMAP2+: control: Add some AM33XX Control module registers Vaibhav Bedia 2012-11-02 12:32 ` Vaibhav Bedia 2012-11-02 12:32 ` [PATCH 11/15] ARM: OMAP: timer: Interchange clksrc and clkevt for AM33XX Vaibhav Bedia 2012-11-02 12:32 ` Vaibhav Bedia 2012-11-03 11:43 ` Kevin Hilman 2012-11-03 11:43 ` Kevin Hilman 2012-11-03 12:47 ` Bedia, Vaibhav 2012-11-03 12:47 ` Bedia, Vaibhav 2012-11-03 13:04 ` Kevin Hilman 2012-11-03 13:04 ` Kevin Hilman 2012-11-03 13:48 ` Bedia, Vaibhav 2012-11-03 13:48 ` Bedia, Vaibhav 2012-11-05 18:03 ` Kevin Hilman 2012-11-05 18:03 ` Kevin Hilman 2012-11-05 21:59 ` Santosh Shilimkar 2012-11-05 21:59 ` Santosh Shilimkar 2012-11-06 14:38 ` Bedia, Vaibhav 2012-11-06 14:38 ` Bedia, Vaibhav 2012-11-08 13:15 ` Bedia, Vaibhav 2012-11-08 13:15 ` Bedia, Vaibhav 2012-11-06 14:33 ` Bedia, Vaibhav 2012-11-06 14:33 ` Bedia, Vaibhav 2012-11-03 16:22 ` Kevin Hilman 2012-11-03 16:22 ` Kevin Hilman 2012-11-05 4:40 ` Bedia, Vaibhav 2012-11-05 4:40 ` Bedia, Vaibhav 2012-11-03 16:31 ` Santosh Shilimkar 2012-11-03 16:31 ` Santosh Shilimkar 2012-11-04 15:26 ` Bedia, Vaibhav 2012-11-04 15:26 ` Bedia, Vaibhav 2012-11-08 20:41 ` Jon Hunter 2012-11-08 20:41 ` Jon Hunter 2012-11-12 22:54 ` Tony Lindgren 2012-11-12 22:54 ` Tony Lindgren 2012-11-02 12:32 ` [PATCH 12/15] ARM: OMAP: timer: Add suspend-resume callbacks for clockevent device Vaibhav Bedia 2012-11-02 12:32 ` Vaibhav Bedia 2012-11-03 12:15 ` Kevin Hilman 2012-11-03 12:15 ` Kevin Hilman 2012-11-03 13:17 ` Bedia, Vaibhav 2012-11-03 13:17 ` Bedia, Vaibhav 2012-11-03 13:41 ` Kevin Hilman 2012-11-03 13:41 ` Kevin Hilman 2012-11-03 14:03 ` Bedia, Vaibhav 2012-11-03 14:03 ` Bedia, Vaibhav 2012-11-05 21:20 ` Jon Hunter 2012-11-05 21:20 ` Jon Hunter 2012-11-06 9:38 ` Bedia, Vaibhav 2012-11-06 9:38 ` Bedia, Vaibhav 2012-11-06 16:02 ` Jon Hunter 2012-11-06 16:02 ` Jon Hunter 2012-11-03 15:52 ` Santosh Shilimkar 2012-11-03 15:52 ` Santosh Shilimkar 2012-11-04 15:25 ` Bedia, Vaibhav [this message] 2012-11-04 15:25 ` Bedia, Vaibhav 2012-11-05 14:55 ` Santosh Shilimkar 2012-11-05 14:55 ` Santosh Shilimkar 2012-11-05 21:04 ` Jon Hunter 2012-11-05 21:04 ` Jon Hunter 2012-11-06 7:32 ` Bedia, Vaibhav 2012-11-06 7:32 ` Bedia, Vaibhav 2012-11-06 16:00 ` Jon Hunter 2012-11-06 16:00 ` Jon Hunter 2012-11-02 12:32 ` [PATCH 13/15] ARM: DTS: AM33XX: Add nodes for OCMCRAM and Mailbox Vaibhav Bedia 2012-11-02 12:32 ` Vaibhav Bedia 2012-11-03 12:16 ` Kevin Hilman 2012-11-03 12:16 ` Kevin Hilman 2012-11-03 13:17 ` Bedia, Vaibhav 2012-11-03 13:17 ` Bedia, Vaibhav 2012-11-03 15:54 ` Santosh Shilimkar 2012-11-03 15:54 ` Santosh Shilimkar 2012-11-04 15:26 ` Bedia, Vaibhav 2012-11-04 15:26 ` Bedia, Vaibhav 2012-11-05 14:53 ` Santosh Shilimkar 2012-11-05 14:53 ` Santosh Shilimkar 2012-11-05 17:57 ` Bedia, Vaibhav 2012-11-05 17:57 ` Bedia, Vaibhav 2012-11-05 19:29 ` Kevin Hilman 2012-11-05 19:29 ` Kevin Hilman 2012-11-05 21:19 ` Santosh Shilimkar 2012-11-05 21:19 ` Santosh Shilimkar 2012-11-05 21:45 ` Santosh Shilimkar 2012-11-05 21:45 ` Santosh Shilimkar 2012-11-06 5:08 ` Bedia, Vaibhav 2012-11-06 5:08 ` Bedia, Vaibhav 2012-11-05 14:58 ` Santosh Shilimkar 2012-11-05 14:58 ` Santosh Shilimkar 2012-11-02 12:32 ` [PATCH 14/15] ARM: OMAP2+: omap2plus_defconfig: Enable Mailbox Vaibhav Bedia 2012-11-02 12:32 ` Vaibhav Bedia 2012-11-03 12:20 ` Kevin Hilman 2012-11-03 12:20 ` Kevin Hilman 2012-11-03 13:17 ` Bedia, Vaibhav 2012-11-03 13:17 ` Bedia, Vaibhav 2012-11-03 13:43 ` Kevin Hilman 2012-11-03 13:43 ` Kevin Hilman 2012-11-02 12:32 ` [PATCH 15/15] ARM: OMAP2+: AM33XX: Basic suspend resume support Vaibhav Bedia 2012-11-02 12:32 ` Vaibhav Bedia 2012-11-02 13:11 ` Bedia, Vaibhav 2012-11-02 13:11 ` Bedia, Vaibhav 2012-11-03 16:57 ` Santosh Shilimkar 2012-11-03 16:57 ` Santosh Shilimkar 2012-11-04 15:26 ` Bedia, Vaibhav 2012-11-04 15:26 ` Bedia, Vaibhav 2012-11-05 17:40 ` Kevin Hilman 2012-11-05 17:40 ` Kevin Hilman 2012-11-05 21:52 ` Santosh Shilimkar 2012-11-05 21:52 ` Santosh Shilimkar 2012-11-06 12:29 ` Bedia, Vaibhav 2012-11-06 12:29 ` Bedia, Vaibhav 2012-11-06 12:38 ` Santosh Shilimkar 2012-11-06 12:38 ` Santosh Shilimkar 2012-11-06 13:00 ` Bedia, Vaibhav 2012-11-06 13:00 ` Bedia, Vaibhav 2012-11-06 10:40 ` Bedia, Vaibhav 2012-11-06 10:40 ` Bedia, Vaibhav 2012-11-07 1:06 ` Kevin Hilman 2012-11-07 1:06 ` Kevin Hilman 2012-11-07 13:25 ` Bedia, Vaibhav 2012-11-07 13:25 ` Bedia, Vaibhav 2012-11-07 17:15 ` Kevin Hilman 2012-11-07 17:15 ` Kevin Hilman 2012-11-08 13:05 ` Bedia, Vaibhav 2012-11-08 13:05 ` Bedia, Vaibhav 2012-11-02 22:16 ` [RFC 00/15] Add basic suspend-resume support for AM33XX Daniel Mack 2012-11-02 22:16 ` Daniel Mack 2012-11-03 8:39 ` Bedia, Vaibhav 2012-11-03 8:39 ` Bedia, Vaibhav
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=B5906170F1614E41A8A28DE3B8D121433EBFFD03@DBDE01.ent.ti.com \ --to=vaibhav.bedia@ti.com \ --cc=b-cousson@ti.com \ --cc=hvaibhav@ti.com \ --cc=khilman@ti.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-omap@vger.kernel.org \ --cc=paul@pwsan.com \ --cc=santosh.shilimkar@ti.com \ --cc=tony@atomide.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.