diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2009-12-17 06:43:29 -0500 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-01-22 11:04:52 -0500 |
commit | a602f0f2f04f150fa1f7312b9e601e8e1a5afe10 (patch) | |
tree | 108f52cfb0450127b0d9390bab101980ca31d73d /arch/arm/mach-pxa/time.c | |
parent | 501d70383aa9ffc78b41aa7e74f6b0254c7c731c (diff) |
arm/{pxa,sa1100,nomadik}: Don't disable irqs in set_next_event and set_mode
These functions are called with irqs already off. This commit removes
the calls to raw_local_irq_save and raw_local_irq_restore on platforms
that don't have to use a shared interrupt for their timekeeping.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-pxa/time.c')
-rw-r--r-- | arch/arm/mach-pxa/time.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c index 750c448db672..293e40aeaf29 100644 --- a/arch/arm/mach-pxa/time.c +++ b/arch/arm/mach-pxa/time.c | |||
@@ -76,14 +76,12 @@ pxa_ost0_interrupt(int irq, void *dev_id) | |||
76 | static int | 76 | static int |
77 | pxa_osmr0_set_next_event(unsigned long delta, struct clock_event_device *dev) | 77 | pxa_osmr0_set_next_event(unsigned long delta, struct clock_event_device *dev) |
78 | { | 78 | { |
79 | unsigned long flags, next, oscr; | 79 | unsigned long next, oscr; |
80 | 80 | ||
81 | raw_local_irq_save(flags); | ||
82 | OIER |= OIER_E0; | 81 | OIER |= OIER_E0; |
83 | next = OSCR + delta; | 82 | next = OSCR + delta; |
84 | OSMR0 = next; | 83 | OSMR0 = next; |
85 | oscr = OSCR; | 84 | oscr = OSCR; |
86 | raw_local_irq_restore(flags); | ||
87 | 85 | ||
88 | return (signed)(next - oscr) <= MIN_OSCR_DELTA ? -ETIME : 0; | 86 | return (signed)(next - oscr) <= MIN_OSCR_DELTA ? -ETIME : 0; |
89 | } | 87 | } |
@@ -91,23 +89,17 @@ pxa_osmr0_set_next_event(unsigned long delta, struct clock_event_device *dev) | |||
91 | static void | 89 | static void |
92 | pxa_osmr0_set_mode(enum clock_event_mode mode, struct clock_event_device *dev) | 90 | pxa_osmr0_set_mode(enum clock_event_mode mode, struct clock_event_device *dev) |
93 | { | 91 | { |
94 | unsigned long irqflags; | ||
95 | |||
96 | switch (mode) { | 92 | switch (mode) { |
97 | case CLOCK_EVT_MODE_ONESHOT: | 93 | case CLOCK_EVT_MODE_ONESHOT: |
98 | raw_local_irq_save(irqflags); | ||
99 | OIER &= ~OIER_E0; | 94 | OIER &= ~OIER_E0; |
100 | OSSR = OSSR_M0; | 95 | OSSR = OSSR_M0; |
101 | raw_local_irq_restore(irqflags); | ||
102 | break; | 96 | break; |
103 | 97 | ||
104 | case CLOCK_EVT_MODE_UNUSED: | 98 | case CLOCK_EVT_MODE_UNUSED: |
105 | case CLOCK_EVT_MODE_SHUTDOWN: | 99 | case CLOCK_EVT_MODE_SHUTDOWN: |
106 | /* initializing, released, or preparing for suspend */ | 100 | /* initializing, released, or preparing for suspend */ |
107 | raw_local_irq_save(irqflags); | ||
108 | OIER &= ~OIER_E0; | 101 | OIER &= ~OIER_E0; |
109 | OSSR = OSSR_M0; | 102 | OSSR = OSSR_M0; |
110 | raw_local_irq_restore(irqflags); | ||
111 | break; | 103 | break; |
112 | 104 | ||
113 | case CLOCK_EVT_MODE_RESUME: | 105 | case CLOCK_EVT_MODE_RESUME: |