]> err.no Git - linux-2.6/blobdiff - arch/i386/kernel/i8253.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
[linux-2.6] / arch / i386 / kernel / i8253.c
index 931eabe1e5609f9aec1fbccda5219ec937e85e43..6d839f2f1b1a6e1abca311760ac89f6a6deec6af 100644 (file)
@@ -13,8 +13,7 @@
 #include <asm/delay.h>
 #include <asm/i8253.h>
 #include <asm/io.h>
-
-#include "io_ports.h"
+#include <asm/timer.h>
 
 DEFINE_SPINLOCK(i8253_lock);
 EXPORT_SYMBOL(i8253_lock);
@@ -47,9 +46,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: