From: Vaibhav Bedia <vaibhav.bedia@ti.com> To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, tony@atomide.com, khilman@deeprootsystems.com Cc: Vaibhav Bedia <vaibhav.bedia@ti.com>, Vaibhav Hiremath <hvaibhav@ti.com>, Santosh Shilimkar <santosh.shilimkar@ti.com>, Benoit Cousson <b-cousson@ti.com>, Paul Walmsley <paul@pwsan.com>, Jon Hunter <jon-hunter@ti.com> Subject: [RFC v2 13/18] ARM: OMAP2+: AM33XX: timer: Interchance clkevt and clksrc timers Date: Mon, 31 Dec 2012 18:37:06 +0530 [thread overview] Message-ID: <1356959231-17335-14-git-send-email-vaibhav.bedia@ti.com> (raw) In-Reply-To: <1356959231-17335-1-git-send-email-vaibhav.bedia@ti.com> AM33XX has two timers (DTIMER0/1) in the WKUP domain. On GP devices the source of DMTIMER0 is fixed to an inaccurate internal 32k RC oscillator and this makes the DMTIMER0 practically either as a clocksource or as clockevent. Currently the timer instance in WKUP domain is used as the clockevent and the timer in non-WKUP domain as the clocksource. DMTIMER1 in WKUP domain can keep running in suspend from a 32K clock fed from external OSC and can serve as the persistent clock for the kernel. To enable this, interchange the timers used as clocksource and clockevent for AM33XX. For now a new DT property has been added to allow the timer code to select the timer with the right property. It has been pointed out by Santosh Shilimkar and Kevin Hilman that such a change will result in soc-idle never being achieved on AM33XX. There are other reasons why soc-idle does not look feasible on AM33XX so for now we go ahead with the interchange of the the timers. If at a later point of time we do come up with an approach which makes soc-idle possible on AM33XX, this can be revisited. Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com> Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com> Cc: Tony Lingren <tony@atomide.com> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com> Cc: Benoit Cousson <b-cousson@ti.com> Cc: Paul Walmsley <paul@pwsan.com> Cc: Kevin Hilman <khilman@deeprootsystems.com> Cc: Jon Hunter <jon-hunter@ti.com> --- v1->v2: Use DT properties for changing the timers .../devicetree/bindings/arm/omap/timer.txt | 2 ++ arch/arm/boot/dts/am33xx.dtsi | 1 + arch/arm/mach-omap2/timer.c | 6 +++--- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/arm/omap/timer.txt b/Documentation/devicetree/bindings/arm/omap/timer.txt index 8732d4d..62d4f2c 100644 --- a/Documentation/devicetree/bindings/arm/omap/timer.txt +++ b/Documentation/devicetree/bindings/arm/omap/timer.txt @@ -18,6 +18,8 @@ Optional properties: - ti,timer-pwm: Indicates the timer can generate a PWM output. - ti,timer-secure: Indicates the timer is reserved on a secure OMAP device and therefore cannot be used by the kernel. +- ti,timer-non-wkup Indicates the timer is in non-wkup power domain and hence + will lose register context when the power domain transitions Example: diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi index 4731748..b4e8bf7 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm/boot/dts/am33xx.dtsi @@ -251,6 +251,7 @@ reg = <0x48040000 0x400>; interrupts = <68>; ti,hwmods = "timer2"; + ti,timer-non-wkup; }; timer3: timer@48042000 { diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 38f9cbc..cfb3413 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c @@ -264,7 +264,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer, int r = 0; if (of_have_populated_dt()) { - np = omap_get_timer_dt(omap_timer_match, NULL); + np = omap_get_timer_dt(omap_timer_match, property); if (!np) return -ENODEV; @@ -633,8 +633,8 @@ OMAP_SYS_TIMER(3_gp, gptimer); #endif /* CONFIG_ARCH_OMAP3 */ #ifdef CONFIG_SOC_AM33XX -OMAP_SYS_GP_TIMER_INIT(3_am33xx, 1, OMAP4_MPU_SOURCE, "ti,timer-alwon", - 2, OMAP4_MPU_SOURCE); +OMAP_SYS_GP_TIMER_INIT(3_am33xx, 2, OMAP4_MPU_SOURCE, "ti,timer-non-wkup", + 1, OMAP4_MPU_SOURCE); OMAP_SYS_TIMER(3_am33xx, gptimer); #endif /* CONFIG_SOC_AM33XX */ -- 1.7.0.4
WARNING: multiple messages have this Message-ID (diff)
From: vaibhav.bedia@ti.com (Vaibhav Bedia) To: linux-arm-kernel@lists.infradead.org Subject: [RFC v2 13/18] ARM: OMAP2+: AM33XX: timer: Interchance clkevt and clksrc timers Date: Mon, 31 Dec 2012 18:37:06 +0530 [thread overview] Message-ID: <1356959231-17335-14-git-send-email-vaibhav.bedia@ti.com> (raw) In-Reply-To: <1356959231-17335-1-git-send-email-vaibhav.bedia@ti.com> AM33XX has two timers (DTIMER0/1) in the WKUP domain. On GP devices the source of DMTIMER0 is fixed to an inaccurate internal 32k RC oscillator and this makes the DMTIMER0 practically either as a clocksource or as clockevent. Currently the timer instance in WKUP domain is used as the clockevent and the timer in non-WKUP domain as the clocksource. DMTIMER1 in WKUP domain can keep running in suspend from a 32K clock fed from external OSC and can serve as the persistent clock for the kernel. To enable this, interchange the timers used as clocksource and clockevent for AM33XX. For now a new DT property has been added to allow the timer code to select the timer with the right property. It has been pointed out by Santosh Shilimkar and Kevin Hilman that such a change will result in soc-idle never being achieved on AM33XX. There are other reasons why soc-idle does not look feasible on AM33XX so for now we go ahead with the interchange of the the timers. If at a later point of time we do come up with an approach which makes soc-idle possible on AM33XX, this can be revisited. Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com> Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com> Cc: Tony Lingren <tony@atomide.com> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com> Cc: Benoit Cousson <b-cousson@ti.com> Cc: Paul Walmsley <paul@pwsan.com> Cc: Kevin Hilman <khilman@deeprootsystems.com> Cc: Jon Hunter <jon-hunter@ti.com> --- v1->v2: Use DT properties for changing the timers .../devicetree/bindings/arm/omap/timer.txt | 2 ++ arch/arm/boot/dts/am33xx.dtsi | 1 + arch/arm/mach-omap2/timer.c | 6 +++--- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/arm/omap/timer.txt b/Documentation/devicetree/bindings/arm/omap/timer.txt index 8732d4d..62d4f2c 100644 --- a/Documentation/devicetree/bindings/arm/omap/timer.txt +++ b/Documentation/devicetree/bindings/arm/omap/timer.txt @@ -18,6 +18,8 @@ Optional properties: - ti,timer-pwm: Indicates the timer can generate a PWM output. - ti,timer-secure: Indicates the timer is reserved on a secure OMAP device and therefore cannot be used by the kernel. +- ti,timer-non-wkup Indicates the timer is in non-wkup power domain and hence + will lose register context when the power domain transitions Example: diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi index 4731748..b4e8bf7 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm/boot/dts/am33xx.dtsi @@ -251,6 +251,7 @@ reg = <0x48040000 0x400>; interrupts = <68>; ti,hwmods = "timer2"; + ti,timer-non-wkup; }; timer3: timer at 48042000 { diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 38f9cbc..cfb3413 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c @@ -264,7 +264,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer, int r = 0; if (of_have_populated_dt()) { - np = omap_get_timer_dt(omap_timer_match, NULL); + np = omap_get_timer_dt(omap_timer_match, property); if (!np) return -ENODEV; @@ -633,8 +633,8 @@ OMAP_SYS_TIMER(3_gp, gptimer); #endif /* CONFIG_ARCH_OMAP3 */ #ifdef CONFIG_SOC_AM33XX -OMAP_SYS_GP_TIMER_INIT(3_am33xx, 1, OMAP4_MPU_SOURCE, "ti,timer-alwon", - 2, OMAP4_MPU_SOURCE); +OMAP_SYS_GP_TIMER_INIT(3_am33xx, 2, OMAP4_MPU_SOURCE, "ti,timer-non-wkup", + 1, OMAP4_MPU_SOURCE); OMAP_SYS_TIMER(3_am33xx, gptimer); #endif /* CONFIG_SOC_AM33XX */ -- 1.7.0.4
next prev parent reply other threads:[~2012-12-31 13:08 UTC|newest] Thread overview: 148+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-12-31 13:06 [RFC v2 00/18] ARM: OMAP2+: AM33XX: Add suspend-resume support Vaibhav Bedia 2012-12-31 13:06 ` Vaibhav Bedia 2012-12-31 13:06 ` [RFC v2 01/18] mailbox: OMAP2+: Add support for AM33XX Vaibhav Bedia 2012-12-31 13:06 ` Vaibhav Bedia 2013-01-01 18:25 ` Tony Lindgren 2013-01-01 18:25 ` Tony Lindgren 2013-01-02 11:09 ` Bedia, Vaibhav 2013-01-02 11:09 ` Bedia, Vaibhav 2013-01-08 13:53 ` Santosh Shilimkar 2013-01-08 13:53 ` Santosh Shilimkar 2013-01-09 5:16 ` Bedia, Vaibhav 2013-01-09 5:16 ` Bedia, Vaibhav 2012-12-31 13:06 ` [RFC v2 02/18] mailbox: Add an API for flushing the FIFO Vaibhav Bedia 2012-12-31 13:06 ` Vaibhav Bedia 2013-01-08 13:56 ` Santosh Shilimkar 2013-01-08 13:56 ` Santosh Shilimkar 2013-01-09 5:16 ` Bedia, Vaibhav 2013-01-09 5:16 ` Bedia, Vaibhav 2012-12-31 13:06 ` [RFC v2 03/18] memory: emif: Move EMIF related header file to include/linux/ Vaibhav Bedia 2012-12-31 13:06 ` Vaibhav Bedia 2013-01-08 14:04 ` Santosh Shilimkar 2013-01-08 14:04 ` Santosh Shilimkar 2013-01-09 5:31 ` Bedia, Vaibhav 2013-01-09 5:31 ` Bedia, Vaibhav 2012-12-31 13:06 ` [RFC v2 04/18] ARM: OMAP2+: AM33XX: CM: Get rid of unncessary header inclusions Vaibhav Bedia 2012-12-31 13:06 ` Vaibhav Bedia 2013-01-08 15:00 ` Santosh Shilimkar 2013-01-08 15:00 ` Santosh Shilimkar 2012-12-31 13:06 ` [RFC v2 05/18] ARM: OMAP2+: AM33XX: CM/PRM: Use __ASSEMBLER__ macros in header files Vaibhav Bedia 2012-12-31 13:06 ` Vaibhav Bedia 2013-01-08 15:01 ` Santosh Shilimkar 2013-01-08 15:01 ` Santosh Shilimkar 2013-01-09 5:31 ` Bedia, Vaibhav 2013-01-09 5:31 ` Bedia, Vaibhav 2012-12-31 13:06 ` [RFC v2 06/18] ARM: OMAP2+: AM33XX: hwmod: Register OCMC RAM hwmod Vaibhav Bedia 2012-12-31 13:06 ` Vaibhav Bedia 2013-01-08 15:04 ` Santosh Shilimkar 2013-01-08 15:04 ` Santosh Shilimkar 2012-12-31 13:07 ` [RFC v2 07/18] ARM: OMAP2+: AM33XX: hwmod: Update TPTC0 hwmod with the right flags Vaibhav Bedia 2012-12-31 13:07 ` Vaibhav Bedia 2013-01-08 15:05 ` Santosh Shilimkar 2013-01-08 15:05 ` Santosh Shilimkar 2013-01-09 6:02 ` Bedia, Vaibhav 2013-01-09 6:02 ` Bedia, Vaibhav 2013-02-11 23:33 ` Kevin Hilman 2013-02-11 23:33 ` Kevin Hilman 2013-02-13 10:56 ` Bedia, Vaibhav 2013-02-13 10:56 ` Bedia, Vaibhav 2012-12-31 13:07 ` [RFC v2 08/18] ARM: OMAP2+: AM33XX: hwmod: Fixup cpgmac0 hwmod entry Vaibhav Bedia 2012-12-31 13:07 ` Vaibhav Bedia 2013-01-08 15:08 ` Santosh Shilimkar 2013-01-08 15:08 ` Santosh Shilimkar 2012-12-31 13:07 ` [RFC v2 09/18] ARM: OMAP2+: AM33XX: hwmod: Update the WKUP-M3 hwmod with reset status bit Vaibhav Bedia 2012-12-31 13:07 ` Vaibhav Bedia 2013-01-08 15:09 ` Santosh Shilimkar 2013-01-08 15:09 ` Santosh Shilimkar 2012-12-31 13:07 ` [RFC v2 10/18] ARM: OMAP2+: AM33XX: Update the hardreset API Vaibhav Bedia 2012-12-31 13:07 ` Vaibhav Bedia 2013-01-08 15:10 ` Santosh Shilimkar 2013-01-08 15:10 ` Santosh Shilimkar 2012-12-31 13:07 ` [RFC v2 11/18] ARM: DTS: AM33XX: Add nodes for OCMC RAM and WKUP-M3 Vaibhav Bedia 2012-12-31 13:07 ` Vaibhav Bedia 2013-01-08 15:12 ` Santosh Shilimkar 2013-01-08 15:12 ` Santosh Shilimkar 2012-12-31 13:07 ` [RFC v2 12/18] ARM: OMAP2+: timer: Add suspend-resume callbacks for clockevent device Vaibhav Bedia 2012-12-31 13:07 ` Vaibhav Bedia 2013-01-08 15:15 ` Santosh Shilimkar 2013-01-08 15:15 ` Santosh Shilimkar 2013-01-11 4:37 ` Bedia, Vaibhav 2013-01-11 4:37 ` Bedia, Vaibhav 2013-01-17 18:45 ` Jon Hunter 2013-01-17 18:45 ` Jon Hunter 2013-01-18 5:25 ` Santosh Shilimkar 2013-01-18 5:25 ` Santosh Shilimkar 2013-01-21 7:22 ` Bedia, Vaibhav 2013-01-21 7:22 ` Bedia, Vaibhav 2013-01-30 17:46 ` Jon Hunter 2013-01-30 17:46 ` Jon Hunter 2013-01-31 11:17 ` Bedia, Vaibhav 2013-01-31 11:17 ` Bedia, Vaibhav 2013-01-17 18:40 ` Jon Hunter 2013-01-17 18:40 ` Jon Hunter 2013-01-21 7:22 ` Bedia, Vaibhav 2013-01-21 7:22 ` Bedia, Vaibhav 2012-12-31 13:07 ` Vaibhav Bedia [this message] 2012-12-31 13:07 ` [RFC v2 13/18] ARM: OMAP2+: AM33XX: timer: Interchance clkevt and clksrc timers Vaibhav Bedia 2013-01-08 15:17 ` Santosh Shilimkar 2013-01-08 15:17 ` Santosh Shilimkar 2013-01-09 5:31 ` Bedia, Vaibhav 2013-01-09 5:31 ` Bedia, Vaibhav 2013-01-17 19:09 ` Jon Hunter 2013-01-17 19:09 ` Jon Hunter 2013-01-24 22:30 ` Jon Hunter 2013-01-24 22:30 ` Jon Hunter 2013-01-30 17:48 ` Jon Hunter 2013-01-30 17:48 ` Jon Hunter 2013-01-30 17:49 ` Jon Hunter 2013-01-30 17:49 ` Jon Hunter 2013-01-31 11:29 ` Bedia, Vaibhav 2013-01-31 11:29 ` Bedia, Vaibhav 2012-12-31 13:07 ` [RFC v2 14/18] ARM: OMAP2+: AM33XX: control: Add some control module registers and APIs Vaibhav Bedia 2012-12-31 13:07 ` Vaibhav Bedia 2013-01-08 15:21 ` Santosh Shilimkar 2013-01-08 15:21 ` Santosh Shilimkar 2013-01-09 5:38 ` Bedia, Vaibhav 2013-01-09 5:38 ` Bedia, Vaibhav 2013-01-09 7:31 ` Santosh Shilimkar 2013-01-09 7:31 ` Santosh Shilimkar 2013-01-09 9:37 ` Bedia, Vaibhav 2013-01-09 9:37 ` Bedia, Vaibhav 2013-01-09 9:53 ` Santosh Shilimkar 2013-01-09 9:53 ` Santosh Shilimkar 2012-12-31 13:07 ` [RFC v2 15/18] ARM: OMAP2+: AM33XX: Add assembly code for PM operations Vaibhav Bedia 2012-12-31 13:07 ` Vaibhav Bedia 2012-12-31 13:07 ` [RFC v2 16/18] ARM: OMAP2+: AM33XX: Basic suspend resume support Vaibhav Bedia 2012-12-31 13:07 ` Vaibhav Bedia 2013-01-17 14:27 ` Peter Korsgaard 2013-01-17 14:27 ` Peter Korsgaard 2013-01-21 10:37 ` Bedia, Vaibhav 2013-01-21 10:37 ` Bedia, Vaibhav 2013-01-22 12:50 ` Peter Korsgaard 2013-01-22 12:50 ` Peter Korsgaard 2013-02-12 1:27 ` Kevin Hilman 2013-02-12 1:27 ` Kevin Hilman 2013-02-13 13:43 ` Bedia, Vaibhav 2013-02-13 13:43 ` Bedia, Vaibhav 2013-02-18 16:11 ` Kevin Hilman 2013-02-18 16:11 ` Kevin Hilman 2013-02-20 9:21 ` Bedia, Vaibhav 2013-02-20 9:21 ` Bedia, Vaibhav 2013-02-20 14:30 ` Kevin Hilman 2013-02-20 14:30 ` Kevin Hilman 2013-04-03 11:52 ` Daniel Mack 2013-04-03 11:52 ` Daniel Mack 2013-04-04 8:47 ` Bedia, Vaibhav 2013-04-04 8:47 ` Bedia, Vaibhav 2012-12-31 13:07 ` [RFC v2 17/18] ARM: OMAP2+: AM33XX: Select Mailbox when PM is enabled Vaibhav Bedia 2012-12-31 13:07 ` Vaibhav Bedia 2013-01-08 15:22 ` Santosh Shilimkar 2013-01-08 15:22 ` Santosh Shilimkar 2013-01-09 5:38 ` Bedia, Vaibhav 2013-01-09 5:38 ` Bedia, Vaibhav 2012-12-31 13:07 ` [RFC v2 18/18] ARM: OMAP2+: AM33XX: Hookup AM33XX PM code into OMAP builds Vaibhav Bedia 2012-12-31 13:07 ` Vaibhav Bedia 2013-01-08 15:31 ` [RFC v2 00/18] ARM: OMAP2+: AM33XX: Add suspend-resume support Santosh Shilimkar 2013-01-08 15:31 ` Santosh Shilimkar 2013-01-09 5:38 ` Bedia, Vaibhav 2013-01-09 5:38 ` 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=1356959231-17335-14-git-send-email-vaibhav.bedia@ti.com \ --to=vaibhav.bedia@ti.com \ --cc=b-cousson@ti.com \ --cc=hvaibhav@ti.com \ --cc=jon-hunter@ti.com \ --cc=khilman@deeprootsystems.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.