|
@@ -3,11 +3,11 @@
|
|
*
|
|
*
|
|
*/
|
|
*/
|
|
#include <linux/clockchips.h>
|
|
#include <linux/clockchips.h>
|
|
-#include <linux/spinlock.h>
|
|
|
|
|
|
+#include <linux/init.h>
|
|
|
|
+#include <linux/interrupt.h>
|
|
#include <linux/jiffies.h>
|
|
#include <linux/jiffies.h>
|
|
-#include <linux/sysdev.h>
|
|
|
|
#include <linux/module.h>
|
|
#include <linux/module.h>
|
|
-#include <linux/init.h>
|
|
|
|
|
|
+#include <linux/spinlock.h>
|
|
|
|
|
|
#include <asm/smp.h>
|
|
#include <asm/smp.h>
|
|
#include <asm/delay.h>
|
|
#include <asm/delay.h>
|
|
@@ -41,26 +41,24 @@ static void init_pit_timer(enum clock_event_mode mode,
|
|
case CLOCK_EVT_MODE_PERIODIC:
|
|
case CLOCK_EVT_MODE_PERIODIC:
|
|
/* binary, mode 2, LSB/MSB, ch 0 */
|
|
/* binary, mode 2, LSB/MSB, ch 0 */
|
|
outb_p(0x34, PIT_MODE);
|
|
outb_p(0x34, PIT_MODE);
|
|
- udelay(10);
|
|
|
|
outb_p(LATCH & 0xff , PIT_CH0); /* LSB */
|
|
outb_p(LATCH & 0xff , PIT_CH0); /* LSB */
|
|
- udelay(10);
|
|
|
|
outb(LATCH >> 8 , PIT_CH0); /* MSB */
|
|
outb(LATCH >> 8 , PIT_CH0); /* MSB */
|
|
break;
|
|
break;
|
|
|
|
|
|
- /*
|
|
|
|
- * Avoid unnecessary state transitions, as it confuses
|
|
|
|
- * Geode / Cyrix based boxen.
|
|
|
|
- */
|
|
|
|
case CLOCK_EVT_MODE_SHUTDOWN:
|
|
case CLOCK_EVT_MODE_SHUTDOWN:
|
|
- if (evt->mode == CLOCK_EVT_MODE_UNUSED)
|
|
|
|
- break;
|
|
|
|
case CLOCK_EVT_MODE_UNUSED:
|
|
case CLOCK_EVT_MODE_UNUSED:
|
|
- if (evt->mode == CLOCK_EVT_MODE_SHUTDOWN)
|
|
|
|
- break;
|
|
|
|
|
|
+ outb_p(0x30, PIT_MODE);
|
|
|
|
+ outb_p(0, PIT_CH0); /* LSB */
|
|
|
|
+ outb_p(0, PIT_CH0); /* MSB */
|
|
|
|
+ break;
|
|
|
|
+
|
|
case CLOCK_EVT_MODE_ONESHOT:
|
|
case CLOCK_EVT_MODE_ONESHOT:
|
|
/* One shot setup */
|
|
/* One shot setup */
|
|
outb_p(0x38, PIT_MODE);
|
|
outb_p(0x38, PIT_MODE);
|
|
- udelay(10);
|
|
|
|
|
|
+ break;
|
|
|
|
+
|
|
|
|
+ case CLOCK_EVT_MODE_RESUME:
|
|
|
|
+ /* Nothing to do here */
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
spin_unlock_irqrestore(&i8253_lock, flags);
|
|
spin_unlock_irqrestore(&i8253_lock, flags);
|