diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2006-09-18 18:21:38 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-09-25 05:25:45 -0400 |
commit | 38ce73ebd74a9a1738b73619557f2397c59ba628 (patch) | |
tree | 02c812c665d0bb9c6872f81ad64328306fa3157f /arch/arm/plat-iop | |
parent | 0b29de4a6ac0936f56b974a3c19bd9c24ac5b5d7 (diff) |
[ARM] 3825/1: iop3xx: use cp6 enable/disable macros
Add CP6 enable/disable sequences to the timekeeping code and the IRQ
code. As a result, we can't depend on CP6 access being enabled when
we enter get_irqnr_and_base anymore, so switch the latter over to
using memory-mapped accesses for now.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/plat-iop')
-rw-r--r-- | arch/arm/plat-iop/time.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/plat-iop/time.c b/arch/arm/plat-iop/time.c index 5730a0d7ed67..bed20f3669f4 100644 --- a/arch/arm/plat-iop/time.c +++ b/arch/arm/plat-iop/time.c | |||
@@ -51,7 +51,9 @@ iop3xx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
51 | { | 51 | { |
52 | write_seqlock(&xtime_lock); | 52 | write_seqlock(&xtime_lock); |
53 | 53 | ||
54 | iop3xx_cp6_enable(); | ||
54 | asm volatile("mcr p6, 0, %0, c6, c1, 0" : : "r" (1)); | 55 | asm volatile("mcr p6, 0, %0, c6, c1, 0" : : "r" (1)); |
56 | iop3xx_cp6_disable(); | ||
55 | 57 | ||
56 | while ((signed long)(next_jiffy_time - *IOP3XX_TU_TCR1) | 58 | while ((signed long)(next_jiffy_time - *IOP3XX_TU_TCR1) |
57 | >= ticks_per_jiffy) { | 59 | >= ticks_per_jiffy) { |
@@ -85,10 +87,12 @@ void __init iop3xx_init_time(unsigned long tick_rate) | |||
85 | * We use timer 0 for our timer interrupt, and timer 1 as | 87 | * We use timer 0 for our timer interrupt, and timer 1 as |
86 | * monotonic counter for tracking missed jiffies. | 88 | * monotonic counter for tracking missed jiffies. |
87 | */ | 89 | */ |
90 | iop3xx_cp6_enable(); | ||
88 | asm volatile("mcr p6, 0, %0, c4, c1, 0" : : "r" (ticks_per_jiffy - 1)); | 91 | asm volatile("mcr p6, 0, %0, c4, c1, 0" : : "r" (ticks_per_jiffy - 1)); |
89 | asm volatile("mcr p6, 0, %0, c0, c1, 0" : : "r" (timer_ctl)); | 92 | asm volatile("mcr p6, 0, %0, c0, c1, 0" : : "r" (timer_ctl)); |
90 | asm volatile("mcr p6, 0, %0, c5, c1, 0" : : "r" (0xffffffff)); | 93 | asm volatile("mcr p6, 0, %0, c5, c1, 0" : : "r" (0xffffffff)); |
91 | asm volatile("mcr p6, 0, %0, c1, c1, 0" : : "r" (timer_ctl)); | 94 | asm volatile("mcr p6, 0, %0, c1, c1, 0" : : "r" (timer_ctl)); |
95 | iop3xx_cp6_disable(); | ||
92 | 96 | ||
93 | setup_irq(IRQ_IOP3XX_TIMER0, &iop3xx_timer_irq); | 97 | setup_irq(IRQ_IOP3XX_TIMER0, &iop3xx_timer_irq); |
94 | } | 98 | } |