diff options
author | Dan Williams <dan.j.williams@intel.com> | 2007-07-19 21:07:26 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-07-20 04:35:42 -0400 |
commit | 70c14ff0e9f5e1f5456587b827620e636ba70a09 (patch) | |
tree | bcd34365e64d6537d833f649a46a534f3a0ff2c6 /arch/arm | |
parent | 7dea1b20066cd30fb54da7e686b16b5e38b46b2d (diff) |
[ARM] 4495/1: iop: combined watchdog timer driver for iop3xx and iop13xx
In order for this driver to be shared across the iop architectures the
iop3xx and iop13xx header files are modified to present a common interface
for the iop_wdt driver.
Details:
* iop13xx supports disabling the timer while iop3xx does not. This requires
a few 'compatibility' definitions in include/asm-arm/hardware/iop3xx.h to
preclude adding #ifdef CONFIG_ARCH_IOP13XX blocks to the driver code.
* The heartbeat interval is derived from the internal bus clock rate, so this
this patch also exports the tick rate to the iop_wdt driver.
Cc: Curt Bruns <curt.e.bruns@intel.com>
Cc: Peter Milne <peter.milne@d-tacq.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/plat-iop/time.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/plat-iop/time.c b/arch/arm/plat-iop/time.c index 100d57ad98ed..ba3d21d8fba3 100644 --- a/arch/arm/plat-iop/time.c +++ b/arch/arm/plat-iop/time.c | |||
@@ -78,6 +78,13 @@ static struct irqaction iop_timer_irq = { | |||
78 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | 78 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, |
79 | }; | 79 | }; |
80 | 80 | ||
81 | static unsigned long iop_tick_rate; | ||
82 | unsigned long get_iop_tick_rate(void) | ||
83 | { | ||
84 | return iop_tick_rate; | ||
85 | } | ||
86 | EXPORT_SYMBOL(get_iop_tick_rate); | ||
87 | |||
81 | void __init iop_init_time(unsigned long tick_rate) | 88 | void __init iop_init_time(unsigned long tick_rate) |
82 | { | 89 | { |
83 | u32 timer_ctl; | 90 | u32 timer_ctl; |
@@ -85,6 +92,7 @@ void __init iop_init_time(unsigned long tick_rate) | |||
85 | ticks_per_jiffy = (tick_rate + HZ/2) / HZ; | 92 | ticks_per_jiffy = (tick_rate + HZ/2) / HZ; |
86 | ticks_per_usec = tick_rate / 1000000; | 93 | ticks_per_usec = tick_rate / 1000000; |
87 | next_jiffy_time = 0xffffffff; | 94 | next_jiffy_time = 0xffffffff; |
95 | iop_tick_rate = tick_rate; | ||
88 | 96 | ||
89 | timer_ctl = IOP_TMR_EN | IOP_TMR_PRIVILEGED | | 97 | timer_ctl = IOP_TMR_EN | IOP_TMR_PRIVILEGED | |
90 | IOP_TMR_RELOAD | IOP_TMR_RATIO_1_1; | 98 | IOP_TMR_RELOAD | IOP_TMR_RATIO_1_1; |