Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7671988b authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Linus Torvalds
Browse files

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: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: Andi Kleen <ak@suse.de>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 82644459
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -47,9 +47,12 @@ static void init_pit_timer(enum clock_event_mode mode,

	case CLOCK_EVT_MODE_SHUTDOWN:
	case CLOCK_EVT_MODE_UNUSED:
		if (evt->mode == CLOCK_EVT_MODE_PERIODIC ||
		    evt->mode == CLOCK_EVT_MODE_ONESHOT) {
			outb_p(0x30, PIT_MODE);
		outb_p(0, PIT_CH0);	/* LSB */
		outb_p(0, PIT_CH0);	/* MSB */
			outb_p(0, PIT_CH0);
			outb_p(0, PIT_CH0);
		}
		break;

	case CLOCK_EVT_MODE_ONESHOT: