aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-iop13xx/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-iop13xx/time.c')
-rw-r--r--arch/arm/mach-iop13xx/time.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/arch/arm/mach-iop13xx/time.c b/arch/arm/mach-iop13xx/time.c
index 8b21365f653f..fc9d9d9a8429 100644
--- a/arch/arm/mach-iop13xx/time.c
+++ b/arch/arm/mach-iop13xx/time.c
@@ -38,11 +38,8 @@ static inline u32 read_tcr1(void)
38unsigned long iop13xx_gettimeoffset(void) 38unsigned long iop13xx_gettimeoffset(void)
39{ 39{
40 unsigned long offset; 40 unsigned long offset;
41 u32 cp_flags;
42 41
43 cp_flags = iop13xx_cp6_save();
44 offset = next_jiffy_time - read_tcr1(); 42 offset = next_jiffy_time - read_tcr1();
45 iop13xx_cp6_restore(cp_flags);
46 43
47 return offset / ticks_per_usec; 44 return offset / ticks_per_usec;
48} 45}
@@ -50,8 +47,6 @@ unsigned long iop13xx_gettimeoffset(void)
50static irqreturn_t 47static irqreturn_t
51iop13xx_timer_interrupt(int irq, void *dev_id) 48iop13xx_timer_interrupt(int irq, void *dev_id)
52{ 49{
53 u32 cp_flags = iop13xx_cp6_save();
54
55 write_seqlock(&xtime_lock); 50 write_seqlock(&xtime_lock);
56 51
57 asm volatile("mcr p6, 0, %0, c6, c9, 0" : : "r" (1)); 52 asm volatile("mcr p6, 0, %0, c6, c9, 0" : : "r" (1));
@@ -64,8 +59,6 @@ iop13xx_timer_interrupt(int irq, void *dev_id)
64 59
65 write_sequnlock(&xtime_lock); 60 write_sequnlock(&xtime_lock);
66 61
67 iop13xx_cp6_restore(cp_flags);
68
69 return IRQ_HANDLED; 62 return IRQ_HANDLED;
70} 63}
71 64
@@ -78,7 +71,6 @@ static struct irqaction iop13xx_timer_irq = {
78void __init iop13xx_init_time(unsigned long tick_rate) 71void __init iop13xx_init_time(unsigned long tick_rate)
79{ 72{
80 u32 timer_ctl; 73 u32 timer_ctl;
81 u32 cp_flags;
82 74
83 ticks_per_jiffy = (tick_rate + HZ/2) / HZ; 75 ticks_per_jiffy = (tick_rate + HZ/2) / HZ;
84 ticks_per_usec = tick_rate / 1000000; 76 ticks_per_usec = tick_rate / 1000000;
@@ -91,12 +83,10 @@ void __init iop13xx_init_time(unsigned long tick_rate)
91 * We use timer 0 for our timer interrupt, and timer 1 as 83 * We use timer 0 for our timer interrupt, and timer 1 as
92 * monotonic counter for tracking missed jiffies. 84 * monotonic counter for tracking missed jiffies.
93 */ 85 */
94 cp_flags = iop13xx_cp6_save();
95 asm volatile("mcr p6, 0, %0, c4, c9, 0" : : "r" (ticks_per_jiffy - 1)); 86 asm volatile("mcr p6, 0, %0, c4, c9, 0" : : "r" (ticks_per_jiffy - 1));
96 asm volatile("mcr p6, 0, %0, c0, c9, 0" : : "r" (timer_ctl)); 87 asm volatile("mcr p6, 0, %0, c0, c9, 0" : : "r" (timer_ctl));
97 asm volatile("mcr p6, 0, %0, c5, c9, 0" : : "r" (0xffffffff)); 88 asm volatile("mcr p6, 0, %0, c5, c9, 0" : : "r" (0xffffffff));
98 asm volatile("mcr p6, 0, %0, c1, c9, 0" : : "r" (timer_ctl)); 89 asm volatile("mcr p6, 0, %0, c1, c9, 0" : : "r" (timer_ctl));
99 iop13xx_cp6_restore(cp_flags);
100 90
101 setup_irq(IRQ_IOP13XX_TIMER0, &iop13xx_timer_irq); 91 setup_irq(IRQ_IOP13XX_TIMER0, &iop13xx_timer_irq);
102} 92}