aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/i8253.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2007-07-21 07:37:38 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-21 20:49:15 -0400
commit7671988b9cd31daf53fd38f8e75c8b881324842b (patch)
treefc4aa3a4cf61f73ee5c6025aff9959ad005ef3b8 /arch/i386/kernel/i8253.c
parent82644459c592a28a3eab682f9b88d81019ddfe8b (diff)
i386: PIT stop only, when in periodic or oneshot mode
The patch is necessary on one of my boxen, where programming the stop sequence twice leads to PIT malfunction. Sigh ! Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Andi Kleen <ak@suse.de> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/i386/kernel/i8253.c')
-rw-r--r--arch/i386/kernel/i8253.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/i386/kernel/i8253.c b/arch/i386/kernel/i8253.c
index 931eabe1e560..bde249dda94d 100644
--- a/arch/i386/kernel/i8253.c
+++ b/arch/i386/kernel/i8253.c
@@ -47,9 +47,12 @@ static void init_pit_timer(enum clock_event_mode mode,
47 47
48 case CLOCK_EVT_MODE_SHUTDOWN: 48 case CLOCK_EVT_MODE_SHUTDOWN:
49 case CLOCK_EVT_MODE_UNUSED: 49 case CLOCK_EVT_MODE_UNUSED:
50 outb_p(0x30, PIT_MODE); 50 if (evt->mode == CLOCK_EVT_MODE_PERIODIC ||
51 outb_p(0, PIT_CH0); /* LSB */ 51 evt->mode == CLOCK_EVT_MODE_ONESHOT) {
52 outb_p(0, PIT_CH0); /* MSB */ 52 outb_p(0x30, PIT_MODE);
53 outb_p(0, PIT_CH0);
54 outb_p(0, PIT_CH0);
55 }
53 break; 56 break;
54 57
55 case CLOCK_EVT_MODE_ONESHOT: 58 case CLOCK_EVT_MODE_ONESHOT: