diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-12-05 16:13:49 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-12-05 16:13:49 -0500 |
commit | 0518469d0a32be1e6dd8850ff274d52d72cdb52d (patch) | |
tree | c13038d099e04208feae565947783cf92ceae9ee /drivers | |
parent | 28a00184be261e3dc152ba0d664a067bbe235b6a (diff) | |
parent | f5a54dd7952e9032785cd1ef0dde72cd61025341 (diff) |
Merge branch 'fortglx/3.3/tip/timers/core' of git://git.linaro.org/people/jstultz/linux into timers/core
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/clocksource/acpi_pm.c | 2 | ||||
-rw-r--r-- | drivers/clocksource/i8253.c | 6 | ||||
-rw-r--r-- | drivers/clocksource/tcb_clksrc.c | 4 |
3 files changed, 5 insertions, 7 deletions
diff --git a/drivers/clocksource/acpi_pm.c b/drivers/clocksource/acpi_pm.c index effe7974aa9a..6b5cf02c35c8 100644 --- a/drivers/clocksource/acpi_pm.c +++ b/drivers/clocksource/acpi_pm.c | |||
@@ -143,7 +143,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_LE, | |||
143 | #ifndef CONFIG_X86_64 | 143 | #ifndef CONFIG_X86_64 |
144 | #include <asm/mach_timer.h> | 144 | #include <asm/mach_timer.h> |
145 | #define PMTMR_EXPECTED_RATE \ | 145 | #define PMTMR_EXPECTED_RATE \ |
146 | ((CALIBRATE_LATCH * (PMTMR_TICKS_PER_SEC >> 10)) / (CLOCK_TICK_RATE>>10)) | 146 | ((CALIBRATE_LATCH * (PMTMR_TICKS_PER_SEC >> 10)) / (PIT_TICK_RATE>>10)) |
147 | /* | 147 | /* |
148 | * Some boards have the PMTMR running way too fast. We check | 148 | * Some boards have the PMTMR running way too fast. We check |
149 | * the PMTMR rate against PIT channel 2 to catch these cases. | 149 | * the PMTMR rate against PIT channel 2 to catch these cases. |
diff --git a/drivers/clocksource/i8253.c b/drivers/clocksource/i8253.c index 27c49e60b7d6..e7cab2da910f 100644 --- a/drivers/clocksource/i8253.c +++ b/drivers/clocksource/i8253.c | |||
@@ -53,7 +53,7 @@ static cycle_t i8253_read(struct clocksource *cs) | |||
53 | count |= inb_p(PIT_CH0) << 8; | 53 | count |= inb_p(PIT_CH0) << 8; |
54 | 54 | ||
55 | /* VIA686a test code... reset the latch if count > max + 1 */ | 55 | /* VIA686a test code... reset the latch if count > max + 1 */ |
56 | if (count > LATCH) { | 56 | if (count > PIT_LATCH) { |
57 | outb_p(0x34, PIT_MODE); | 57 | outb_p(0x34, PIT_MODE); |
58 | outb_p(PIT_LATCH & 0xff, PIT_CH0); | 58 | outb_p(PIT_LATCH & 0xff, PIT_CH0); |
59 | outb_p(PIT_LATCH >> 8, PIT_CH0); | 59 | outb_p(PIT_LATCH >> 8, PIT_CH0); |
@@ -114,8 +114,8 @@ static void init_pit_timer(enum clock_event_mode mode, | |||
114 | case CLOCK_EVT_MODE_PERIODIC: | 114 | case CLOCK_EVT_MODE_PERIODIC: |
115 | /* binary, mode 2, LSB/MSB, ch 0 */ | 115 | /* binary, mode 2, LSB/MSB, ch 0 */ |
116 | outb_p(0x34, PIT_MODE); | 116 | outb_p(0x34, PIT_MODE); |
117 | outb_p(LATCH & 0xff , PIT_CH0); /* LSB */ | 117 | outb_p(PIT_LATCH & 0xff , PIT_CH0); /* LSB */ |
118 | outb_p(LATCH >> 8 , PIT_CH0); /* MSB */ | 118 | outb_p(PIT_LATCH >> 8 , PIT_CH0); /* MSB */ |
119 | break; | 119 | break; |
120 | 120 | ||
121 | case CLOCK_EVT_MODE_SHUTDOWN: | 121 | case CLOCK_EVT_MODE_SHUTDOWN: |
diff --git a/drivers/clocksource/tcb_clksrc.c b/drivers/clocksource/tcb_clksrc.c index 79c47e88d5d1..55d0f95f82f9 100644 --- a/drivers/clocksource/tcb_clksrc.c +++ b/drivers/clocksource/tcb_clksrc.c | |||
@@ -59,7 +59,6 @@ static struct clocksource clksrc = { | |||
59 | .rating = 200, | 59 | .rating = 200, |
60 | .read = tc_get_cycles, | 60 | .read = tc_get_cycles, |
61 | .mask = CLOCKSOURCE_MASK(32), | 61 | .mask = CLOCKSOURCE_MASK(32), |
62 | .shift = 18, | ||
63 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 62 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
64 | }; | 63 | }; |
65 | 64 | ||
@@ -256,7 +255,6 @@ static int __init tcb_clksrc_init(void) | |||
256 | best_divisor_idx = i; | 255 | best_divisor_idx = i; |
257 | } | 256 | } |
258 | 257 | ||
259 | clksrc.mult = clocksource_hz2mult(divided_rate, clksrc.shift); | ||
260 | 258 | ||
261 | printk(bootinfo, clksrc.name, CONFIG_ATMEL_TCB_CLKSRC_BLOCK, | 259 | printk(bootinfo, clksrc.name, CONFIG_ATMEL_TCB_CLKSRC_BLOCK, |
262 | divided_rate / 1000000, | 260 | divided_rate / 1000000, |
@@ -292,7 +290,7 @@ static int __init tcb_clksrc_init(void) | |||
292 | __raw_writel(ATMEL_TC_SYNC, tcaddr + ATMEL_TC_BCR); | 290 | __raw_writel(ATMEL_TC_SYNC, tcaddr + ATMEL_TC_BCR); |
293 | 291 | ||
294 | /* and away we go! */ | 292 | /* and away we go! */ |
295 | clocksource_register(&clksrc); | 293 | clocksource_register_hz(&clksrc, divided_rate); |
296 | 294 | ||
297 | /* channel 2: periodic and oneshot timer support */ | 295 | /* channel 2: periodic and oneshot timer support */ |
298 | setup_clkevents(tc, clk32k_divisor_idx); | 296 | setup_clkevents(tc, clk32k_divisor_idx); |