diff options
Diffstat (limited to 'arch/x86/kernel/i8253.c')
-rw-r--r-- | arch/x86/kernel/i8253.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/arch/x86/kernel/i8253.c b/arch/x86/kernel/i8253.c index c76fef1ce355..ef62b07b2b48 100644 --- a/arch/x86/kernel/i8253.c +++ b/arch/x86/kernel/i8253.c | |||
@@ -43,26 +43,26 @@ static void init_pit_timer(enum clock_event_mode mode, | |||
43 | switch(mode) { | 43 | switch(mode) { |
44 | case CLOCK_EVT_MODE_PERIODIC: | 44 | case CLOCK_EVT_MODE_PERIODIC: |
45 | /* binary, mode 2, LSB/MSB, ch 0 */ | 45 | /* binary, mode 2, LSB/MSB, ch 0 */ |
46 | outb_p(0x34, PIT_MODE); | 46 | outb_pit(0x34, PIT_MODE); |
47 | outb_p(LATCH & 0xff , PIT_CH0); /* LSB */ | 47 | outb_pit(LATCH & 0xff , PIT_CH0); /* LSB */ |
48 | outb(LATCH >> 8 , PIT_CH0); /* MSB */ | 48 | outb_pit(LATCH >> 8 , PIT_CH0); /* MSB */ |
49 | break; | 49 | break; |
50 | 50 | ||
51 | case CLOCK_EVT_MODE_SHUTDOWN: | 51 | case CLOCK_EVT_MODE_SHUTDOWN: |
52 | case CLOCK_EVT_MODE_UNUSED: | 52 | case CLOCK_EVT_MODE_UNUSED: |
53 | if (evt->mode == CLOCK_EVT_MODE_PERIODIC || | 53 | if (evt->mode == CLOCK_EVT_MODE_PERIODIC || |
54 | evt->mode == CLOCK_EVT_MODE_ONESHOT) { | 54 | evt->mode == CLOCK_EVT_MODE_ONESHOT) { |
55 | outb_p(0x30, PIT_MODE); | 55 | outb_pit(0x30, PIT_MODE); |
56 | outb_p(0, PIT_CH0); | 56 | outb_pit(0, PIT_CH0); |
57 | outb_p(0, PIT_CH0); | 57 | outb_pit(0, PIT_CH0); |
58 | } | 58 | } |
59 | pit_disable_clocksource(); | 59 | pit_disable_clocksource(); |
60 | break; | 60 | break; |
61 | 61 | ||
62 | case CLOCK_EVT_MODE_ONESHOT: | 62 | case CLOCK_EVT_MODE_ONESHOT: |
63 | /* One shot setup */ | 63 | /* One shot setup */ |
64 | outb_p(0x38, PIT_MODE); | ||
65 | pit_disable_clocksource(); | 64 | pit_disable_clocksource(); |
65 | outb_pit(0x38, PIT_MODE); | ||
66 | break; | 66 | break; |
67 | 67 | ||
68 | case CLOCK_EVT_MODE_RESUME: | 68 | case CLOCK_EVT_MODE_RESUME: |
@@ -80,8 +80,8 @@ static void init_pit_timer(enum clock_event_mode mode, | |||
80 | static int pit_next_event(unsigned long delta, struct clock_event_device *evt) | 80 | static int pit_next_event(unsigned long delta, struct clock_event_device *evt) |
81 | { | 81 | { |
82 | spin_lock(&i8253_lock); | 82 | spin_lock(&i8253_lock); |
83 | outb_p(delta & 0xff , PIT_CH0); /* LSB */ | 83 | outb_pit(delta & 0xff , PIT_CH0); /* LSB */ |
84 | outb(delta >> 8 , PIT_CH0); /* MSB */ | 84 | outb_pit(delta >> 8 , PIT_CH0); /* MSB */ |
85 | spin_unlock(&i8253_lock); | 85 | spin_unlock(&i8253_lock); |
86 | 86 | ||
87 | return 0; | 87 | return 0; |
@@ -153,15 +153,15 @@ static cycle_t pit_read(void) | |||
153 | * count), it cannot be newer. | 153 | * count), it cannot be newer. |
154 | */ | 154 | */ |
155 | jifs = jiffies; | 155 | jifs = jiffies; |
156 | outb_p(0x00, PIT_MODE); /* latch the count ASAP */ | 156 | outb_pit(0x00, PIT_MODE); /* latch the count ASAP */ |
157 | count = inb_p(PIT_CH0); /* read the latched count */ | 157 | count = inb_pit(PIT_CH0); /* read the latched count */ |
158 | count |= inb_p(PIT_CH0) << 8; | 158 | count |= inb_pit(PIT_CH0) << 8; |
159 | 159 | ||
160 | /* VIA686a test code... reset the latch if count > max + 1 */ | 160 | /* VIA686a test code... reset the latch if count > max + 1 */ |
161 | if (count > LATCH) { | 161 | if (count > LATCH) { |
162 | outb_p(0x34, PIT_MODE); | 162 | outb_pit(0x34, PIT_MODE); |
163 | outb_p(LATCH & 0xff, PIT_CH0); | 163 | outb_pit(LATCH & 0xff, PIT_CH0); |
164 | outb(LATCH >> 8, PIT_CH0); | 164 | outb_pit(LATCH >> 8, PIT_CH0); |
165 | count = LATCH - 1; | 165 | count = LATCH - 1; |
166 | } | 166 | } |
167 | 167 | ||