summaryrefslogtreecommitdiff
path: root/recipes/linux/linux-omap2-git/beagleboard/01-make_tick_gptimer_configurable
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/linux/linux-omap2-git/beagleboard/01-make_tick_gptimer_configurable
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/linux/linux-omap2-git/beagleboard/01-make_tick_gptimer_configurable')
-rw-r--r--recipes/linux/linux-omap2-git/beagleboard/01-make_tick_gptimer_configurable58
1 files changed, 58 insertions, 0 deletions
diff --git a/recipes/linux/linux-omap2-git/beagleboard/01-make_tick_gptimer_configurable b/recipes/linux/linux-omap2-git/beagleboard/01-make_tick_gptimer_configurable
new file mode 100644
index 0000000000..bcf0fa79f8
--- /dev/null
+++ b/recipes/linux/linux-omap2-git/beagleboard/01-make_tick_gptimer_configurable
@@ -0,0 +1,58 @@
+OMAP2/3 GPTIMER: allow system tick GPTIMER to be configurable at build
+
+From: Paul Walmsley <paul@pwsan.com>
+
+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.
+
+At this point, it appears that most boards are fine with GPTIMER1,
+but Beagle should use GPTIMER12.
+---
+
+ arch/arm/mach-omap2/Kconfig | 16 ++++++++++++++++
+ arch/arm/mach-omap2/timer-gp.c | 2 +-
+ 2 files changed, 17 insertions(+), 1 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
+index bb6d695..0002cb6 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..ec80af5 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)