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-sa1100/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-sa1100/time.c')
-rw-r--r-- | arch/arm/mach-sa1100/time.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c index b9cbb56d6e9d..74b6e0e570b6 100644 --- a/arch/arm/mach-sa1100/time.c +++ b/arch/arm/mach-sa1100/time.c | |||
@@ -35,14 +35,12 @@ static irqreturn_t sa1100_ost0_interrupt(int irq, void *dev_id) | |||
35 | static int | 35 | static int |
36 | sa1100_osmr0_set_next_event(unsigned long delta, struct clock_event_device *c) | 36 | sa1100_osmr0_set_next_event(unsigned long delta, struct clock_event_device *c) |
37 | { | 37 | { |
38 | unsigned long flags, next, oscr; | 38 | unsigned long next, oscr; |
39 | 39 | ||
40 | raw_local_irq_save(flags); | ||
41 | OIER |= OIER_E0; | 40 | OIER |= OIER_E0; |
42 | next = OSCR + delta; | 41 | next = OSCR + delta; |
43 | OSMR0 = next; | 42 | OSMR0 = next; |
44 | oscr = OSCR; | 43 | oscr = OSCR; |
45 | raw_local_irq_restore(flags); | ||
46 | 44 | ||
47 | return (signed)(next - oscr) <= MIN_OSCR_DELTA ? -ETIME : 0; | 45 | return (signed)(next - oscr) <= MIN_OSCR_DELTA ? -ETIME : 0; |
48 | } | 46 | } |
@@ -50,16 +48,12 @@ sa1100_osmr0_set_next_event(unsigned long delta, struct clock_event_device *c) | |||
50 | static void | 48 | static void |
51 | sa1100_osmr0_set_mode(enum clock_event_mode mode, struct clock_event_device *c) | 49 | sa1100_osmr0_set_mode(enum clock_event_mode mode, struct clock_event_device *c) |
52 | { | 50 | { |
53 | unsigned long flags; | ||
54 | |||
55 | switch (mode) { | 51 | switch (mode) { |
56 | case CLOCK_EVT_MODE_ONESHOT: | 52 | case CLOCK_EVT_MODE_ONESHOT: |
57 | case CLOCK_EVT_MODE_UNUSED: | 53 | case CLOCK_EVT_MODE_UNUSED: |
58 | case CLOCK_EVT_MODE_SHUTDOWN: | 54 | case CLOCK_EVT_MODE_SHUTDOWN: |
59 | raw_local_irq_save(flags); | ||
60 | OIER &= ~OIER_E0; | 55 | OIER &= ~OIER_E0; |
61 | OSSR = OSSR_M0; | 56 | OSSR = OSSR_M0; |
62 | raw_local_irq_restore(flags); | ||
63 | break; | 57 | break; |
64 | 58 | ||
65 | case CLOCK_EVT_MODE_RESUME: | 59 | case CLOCK_EVT_MODE_RESUME: |