* [PATCH 0/2] OMAP3 timer: switch Beagle clockevents source to GPTIMER12
@ 2008-08-11 23:34 Paul Walmsley
2008-08-11 23:34 ` [PATCH 1/2] OMAP2/3 GPTIMER: allow system tick GPTIMER to be configurable at build Paul Walmsley
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Paul Walmsley @ 2008-08-11 23:34 UTC (permalink / raw)
To: linux-omap
This patch series allows the clockevents source GPTIMER to be selectable via
Kconfig, and changes the Beagle Kbuild config to use GPTIMER12 instead of
GPTIMER1. The theory here is that GPTIMER12 has its own internal 32kHz
secure oscillator, and does not depend on the external 32kHz clock source,
which we suspect may be noisy.
---
size:
text data bss dec hex filename
3265520 145472 105480 3516472 35a838 vmlinux.beagle.orig
3265568 145472 105480 3516520 35a868 vmlinux.beagle
arch/arm/configs/omap3_beagle_defconfig | 5 +++--
arch/arm/mach-omap2/Kconfig | 16 ++++++++++++++++
arch/arm/mach-omap2/timer-gp.c | 5 ++++-
3 files changed, 23 insertions(+), 3 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] OMAP2/3 GPTIMER: allow system tick GPTIMER to be configurable at build
2008-08-11 23:34 [PATCH 0/2] OMAP3 timer: switch Beagle clockevents source to GPTIMER12 Paul Walmsley
@ 2008-08-11 23:34 ` Paul Walmsley
2008-08-11 23:34 ` [PATCH 2/2] BeagleBoard: make Beagle use GPTIMER12 for system ticks Paul Walmsley
2008-08-13 13:36 ` [PATCH 0/2] OMAP3 timer: switch Beagle clockevents source to GPTIMER12 Tony Lindgren
2 siblings, 0 replies; 5+ messages in thread
From: Paul Walmsley @ 2008-08-11 23:34 UTC (permalink / raw)
To: linux-omap; +Cc: Paul Walmsley
Add Kbuild code to allow the builder to select which GPTIMER block to use
for the Linux clockevents timer. Practical choices at this point are
GPTIMER1 or GPTIMER12. Both of these timers are in the WKUP powerdomain,
and so are unaffected by chip power management. GPTIMER1 can use sys_clk
as a source, for applications where a high-resolution timer is more important
than power management. GPTIMER12 has the special property that it has
the secure 32kHz oscillator as its source clock, which may be less prone
to glitches than the off-chip 32kHz oscillator. But on HS devices, it may
not be available for Linux use.
At this point, it appears that most boards are fine with GPTIMER1, but
Beagle should use GPTIMER12.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
arch/arm/mach-omap2/Kconfig | 16 ++++++++++++++++
arch/arm/mach-omap2/timer-gp.c | 5 ++++-
2 files changed, 20 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index bb6d695..365b982 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -122,3 +122,19 @@ config MACH_OMAP3EVM
config MACH_OMAP3_BEAGLE
bool "OMAP3 BEAGLE board"
depends on ARCH_OMAP3 && ARCH_OMAP34XX
+
+config OMAP_TICK_GPTIMER
+ int "GPTIMER used for system tick timer"
+ depends on ARCH_OMAP2 || ARCH_OMAP3
+ range 1 12
+ default 1
+ help
+ Linux uses one of the twelve on-board OMAP GPTIMER blocks to generate
+ system tick interrupts. The twelve GPTIMERs have slightly
+ different powerdomain, source clock, and security properties
+ (mostly documented in the OMAP3 TRMs) that can affect the selection
+ of which GPTIMER to use. The historical default is GPTIMER1.
+ If CONFIG_OMAP_32K_TIMER is selected, Beagle may require GPTIMER12
+ due to hardware sensitivity to glitches on the OMAP 32kHz clock
+ input.
+
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
index 557603f..691a7f8 100644
--- a/arch/arm/mach-omap2/timer-gp.c
+++ b/arch/arm/mach-omap2/timer-gp.c
@@ -99,7 +99,7 @@ static void __init omap2_gp_clockevent_init(void)
{
u32 tick_rate;
- gptimer = omap_dm_timer_request_specific(1);
+ gptimer = omap_dm_timer_request_specific(CONFIG_OMAP_TICK_GPTIMER);
BUG_ON(gptimer == NULL);
#if defined(CONFIG_OMAP_32K_TIMER)
@@ -109,6 +109,9 @@ static void __init omap2_gp_clockevent_init(void)
#endif
tick_rate = clk_get_rate(omap_dm_timer_get_fclk(gptimer));
+ pr_info("OMAP clockevent source: GPTIMER%d at %u Hz\n",
+ CONFIG_OMAP_TICK_GPTIMER, tick_rate);
+
omap2_gp_timer_irq.dev_id = (void *)gptimer;
setup_irq(omap_dm_timer_get_irq(gptimer), &omap2_gp_timer_irq);
omap_dm_timer_set_int_enable(gptimer, OMAP_TIMER_INT_OVERFLOW);
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] BeagleBoard: make Beagle use GPTIMER12 for system ticks
2008-08-11 23:34 [PATCH 0/2] OMAP3 timer: switch Beagle clockevents source to GPTIMER12 Paul Walmsley
2008-08-11 23:34 ` [PATCH 1/2] OMAP2/3 GPTIMER: allow system tick GPTIMER to be configurable at build Paul Walmsley
@ 2008-08-11 23:34 ` Paul Walmsley
2008-08-11 23:39 ` Paul Walmsley
2008-08-13 13:36 ` [PATCH 0/2] OMAP3 timer: switch Beagle clockevents source to GPTIMER12 Tony Lindgren
2 siblings, 1 reply; 5+ messages in thread
From: Paul Walmsley @ 2008-08-11 23:34 UTC (permalink / raw)
To: linux-omap
Cc: Paul Walmsley, Khasim Syed Mohammed, Koen Kooi, Steve Sakoman,
Richard Woodruff, Tony Lindgren, Philip Balister, Dirk Behme
There is suspicion that the 32kHz input clock to the OMAP may be noisy
on BeagleBoards. On OMAP2/3 GPTIMER1, this can cause the timer
counter register to warp to unknown values or miss interrupt
conditions. So, use GPTIMER12 instead, which apparently has its own
secure 32kHz oscillator and will hopefully not be prone to the
suspected sys_32k glitches.
This is only a workaround. If sys_32k is noisy, other system peripherals
may be affected.
This workaround is a collective product of several people, most notably
Philip Balister <philip@balister.org>, Dirk Behme <dirk.behme@googlemail.com>,
Koen Kooi <k.kooi@student.utwente.nl>, Tony Lindgren <tony@atomide.com>,
Steve Sakoman <sakoman@gmail.com>, Khasim Syed Mohammed <khasim@ti.com>
Richard Woodruff <r-woodruff2@ti.com>. I apologize if there is anyone whom
I've missed.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Khasim Syed Mohammed <khasim@ti.com>
Cc: Koen Kooi <k.kooi@student.utwente.nl>
Cc: Steve Sakoman <sakoman@gmail.com>
Cc: Richard Woodruff <r-woodruff2@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Philip Balister <philip@balister.org>
Cc: Dirk Behme <dirk.behme@googlemail.com>
---
arch/arm/configs/omap3_beagle_defconfig | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/configs/omap3_beagle_defconfig b/arch/arm/configs/omap3_beagle_defconfig
index e1b16d0..7805995 100644
--- a/arch/arm/configs/omap3_beagle_defconfig
+++ b/arch/arm/configs/omap3_beagle_defconfig
@@ -182,8 +182,8 @@ CONFIG_OMAP_BOOT_REASON=y
# CONFIG_OMAP_MCBSP is not set
# CONFIG_OMAP_MMU_FWK is not set
# CONFIG_OMAP_MBOX_FWK is not set
-CONFIG_OMAP_MPU_TIMER=y
-# CONFIG_OMAP_32K_TIMER is not set
+# CONFIG_OMAP_MPU_TIMER is not set
+CONFIG_OMAP_32K_TIMER=y
CONFIG_OMAP_DM_TIMER=y
# CONFIG_OMAP_LL_DEBUG_UART1 is not set
# CONFIG_OMAP_LL_DEBUG_UART2 is not set
@@ -198,6 +198,7 @@ CONFIG_ARCH_OMAP3430=y
# CONFIG_MACH_OMAP_3430SDP is not set
# CONFIG_MACH_OMAP3EVM is not set
CONFIG_MACH_OMAP3_BEAGLE=y
+CONFIG_OMAP_TICK_GPTIMER=12
#
# Boot options
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] BeagleBoard: make Beagle use GPTIMER12 for system ticks
2008-08-11 23:34 ` [PATCH 2/2] BeagleBoard: make Beagle use GPTIMER12 for system ticks Paul Walmsley
@ 2008-08-11 23:39 ` Paul Walmsley
0 siblings, 0 replies; 5+ messages in thread
From: Paul Walmsley @ 2008-08-11 23:39 UTC (permalink / raw)
To: linux-omap; +Cc: khilman
On Mon, 11 Aug 2008, Paul Walmsley wrote:
> This workaround is a collective product of several people, most notably
> Philip Balister <philip@balister.org>, Dirk Behme <dirk.behme@googlemail.com>,
> Koen Kooi <k.kooi@student.utwente.nl>, Tony Lindgren <tony@atomide.com>,
> Steve Sakoman <sakoman@gmail.com>, Khasim Syed Mohammed <khasim@ti.com>
> Richard Woodruff <r-woodruff2@ti.com>. I apologize if there is anyone whom
> I've missed.
And of course I think of someone right after I hit send: Kevin Hilman
<khilman@deeprootsystems.com> as well.
- Paul
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] OMAP3 timer: switch Beagle clockevents source to GPTIMER12
2008-08-11 23:34 [PATCH 0/2] OMAP3 timer: switch Beagle clockevents source to GPTIMER12 Paul Walmsley
2008-08-11 23:34 ` [PATCH 1/2] OMAP2/3 GPTIMER: allow system tick GPTIMER to be configurable at build Paul Walmsley
2008-08-11 23:34 ` [PATCH 2/2] BeagleBoard: make Beagle use GPTIMER12 for system ticks Paul Walmsley
@ 2008-08-13 13:36 ` Tony Lindgren
2 siblings, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2008-08-13 13:36 UTC (permalink / raw)
To: Paul Walmsley; +Cc: linux-omap
* Paul Walmsley <paul@pwsan.com> [080812 02:38]:
> This patch series allows the clockevents source GPTIMER to be selectable via
> Kconfig, and changes the Beagle Kbuild config to use GPTIMER12 instead of
> GPTIMER1. The theory here is that GPTIMER12 has its own internal 32kHz
> secure oscillator, and does not depend on the external 32kHz clock source,
> which we suspect may be noisy.
Pushing these today.
Tony
>
>
> ---
>
> size:
> text data bss dec hex filename
> 3265520 145472 105480 3516472 35a838 vmlinux.beagle.orig
> 3265568 145472 105480 3516520 35a868 vmlinux.beagle
>
> arch/arm/configs/omap3_beagle_defconfig | 5 +++--
> arch/arm/mach-omap2/Kconfig | 16 ++++++++++++++++
> arch/arm/mach-omap2/timer-gp.c | 5 ++++-
> 3 files changed, 23 insertions(+), 3 deletions(-)
>
> --
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-08-13 13:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-11 23:34 [PATCH 0/2] OMAP3 timer: switch Beagle clockevents source to GPTIMER12 Paul Walmsley
2008-08-11 23:34 ` [PATCH 1/2] OMAP2/3 GPTIMER: allow system tick GPTIMER to be configurable at build Paul Walmsley
2008-08-11 23:34 ` [PATCH 2/2] BeagleBoard: make Beagle use GPTIMER12 for system ticks Paul Walmsley
2008-08-11 23:39 ` Paul Walmsley
2008-08-13 13:36 ` [PATCH 0/2] OMAP3 timer: switch Beagle clockevents source to GPTIMER12 Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox