summaryrefslogtreecommitdiff
path: root/arch/i386/kernel/i8253.c
diff options
context:
space:
mode:
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,
case CLOCK_EVT_MODE_SHUTDOWN:
case CLOCK_EVT_MODE_UNUSED:
- outb_p(0x30, PIT_MODE);
- outb_p(0, PIT_CH0); /* LSB */
- outb_p(0, PIT_CH0); /* MSB */
+ if (evt->mode == CLOCK_EVT_MODE_PERIODIC ||
+ evt->mode == CLOCK_EVT_MODE_ONESHOT) {
+ outb_p(0x30, PIT_MODE);
+ outb_p(0, PIT_CH0);
+ outb_p(0, PIT_CH0);
+ }
break;
case CLOCK_EVT_MODE_ONESHOT: