diff options
author | David Brownell <david-b@pacbell.net> | 2008-02-22 20:28:37 -0500 |
---|---|---|
committer | Haavard Skinnemoen <hskinnemoen@atmel.com> | 2008-03-04 07:42:24 -0500 |
commit | 4d243f92e48a7913938f48fa9ebea5239168bb11 (patch) | |
tree | 8068f70eda76ff21839f9672771d3bd0ab9deb58 /drivers/misc/Kconfig | |
parent | 2a341f5cf57dce9d89b41484a69e88adc6422f6c (diff) |
atmel_tc clocksource/clockevent code
Clocksource and clockevent device based on the Atmel TC blocks.
The clockevent device handles both periodic and oneshot modes, so this
enables NO_HZ and high res timers on some platforms that previously
couldn't use those mechanisms.
This works on both AVR32 and AT91 chips, given relevant patches for
tclib support (always) and clockevents (or else this will only look
like a higher precision clocksource). It's an updated and modularized
version of an AT91-only patch that has circulated for some time now.
Changes relative to the original patch:
* Update to use new tclib API
* Replace open-coded do-while loop using goto with a real do-while loop
* Minor irq handler optimization: Load register base address from
dev_id instead of a global variable.
* Aggressively turn off clocks when the clockevent isn't being used
* Include the clockevent code on AT91RM9200 as well. The rating is
lower than the System Timer, so the clock will usually stay off.
* Don't assume that the number of clocks is always equal to the
number of irqs.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Diffstat (limited to 'drivers/misc/Kconfig')
-rw-r--r-- | drivers/misc/Kconfig | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index b3ba68170b81..4cf928e32e78 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig | |||
@@ -30,6 +30,31 @@ config ATMEL_TCLIB | |||
30 | blocks found on many Atmel processors. This facilitates using | 30 | blocks found on many Atmel processors. This facilitates using |
31 | these blocks by different drivers despite processor differences. | 31 | these blocks by different drivers despite processor differences. |
32 | 32 | ||
33 | config ATMEL_TCB_CLKSRC | ||
34 | bool "TC Block Clocksource" | ||
35 | depends on ATMEL_TCLIB && GENERIC_TIME | ||
36 | default y | ||
37 | help | ||
38 | Select this to get a high precision clocksource based on a | ||
39 | TC block with a 5+ MHz base clock rate. Two timer channels | ||
40 | are combined to make a single 32-bit timer. | ||
41 | |||
42 | When GENERIC_CLOCKEVENTS is defined, the third timer channel | ||
43 | may be used as a clock event device supporting oneshot mode | ||
44 | (delays of up to two seconds) based on the 32 KiHz clock. | ||
45 | |||
46 | config ATMEL_TCB_CLKSRC_BLOCK | ||
47 | int | ||
48 | depends on ATMEL_TCB_CLKSRC | ||
49 | prompt "TC Block" if ARCH_AT91RM9200 || ARCH_AT91SAM9260 || CPU_AT32AP700X | ||
50 | default 0 | ||
51 | range 0 1 | ||
52 | help | ||
53 | Some chips provide more than one TC block, so you have the | ||
54 | choice of which one to use for the clock framework. The other | ||
55 | TC can be used for other purposes, such as PWM generation and | ||
56 | interval timing. | ||
57 | |||
33 | config IBM_ASM | 58 | config IBM_ASM |
34 | tristate "Device driver for IBM RSA service processor" | 59 | tristate "Device driver for IBM RSA service processor" |
35 | depends on X86 && PCI && INPUT && EXPERIMENTAL | 60 | depends on X86 && PCI && INPUT && EXPERIMENTAL |