Pull asus into release branch
[pandora-kernel.git] / arch / i386 / kernel / i8253.c
index a6bc7bb..10cef5c 100644 (file)
@@ -47,9 +47,17 @@ static void init_pit_timer(enum clock_event_mode mode,
                outb(LATCH >> 8 , PIT_CH0);     /* MSB */
                break;
 
-       case CLOCK_EVT_MODE_ONESHOT:
+       /*
+        * Avoid unnecessary state transitions, as it confuses
+        * Geode / Cyrix based boxen.
+        */
        case CLOCK_EVT_MODE_SHUTDOWN:
+               if (evt->mode == CLOCK_EVT_MODE_UNUSED)
+                       break;
        case CLOCK_EVT_MODE_UNUSED:
+               if (evt->mode == CLOCK_EVT_MODE_SHUTDOWN)
+                       break;
+       case CLOCK_EVT_MODE_ONESHOT:
                /* One shot setup */
                outb_p(0x38, PIT_MODE);
                udelay(10);
@@ -195,4 +203,4 @@ static int __init init_pit_clocksource(void)
        clocksource_pit.mult = clocksource_hz2mult(CLOCK_TICK_RATE, 20);
        return clocksource_register(&clocksource_pit);
 }
-module_init(init_pit_clocksource);
+arch_initcall(init_pit_clocksource);