linux/drivers/clocksource
Deepak Saxena 5f724e84f9 time: x86: Replace LATCH with PIT_LATCH in i8253 clocksource driver
The i8253 clockevent & clocksource driver uses PIT_LATCH
except for two cases where it uses LATCH:

1)
	/* VIA686a test code... reset the latch if count > max + 1 */
	if (count > LATCH) {

LATCH is based on CLOCK_TICK_RATE which is defined as
PIT_TICK_RATE on x86 so this should just be the later.

2)
	...
	switch (mode) {
	case CLOCK_EVT_MODE_PERIODIC:
		/* binary, mode 2, LSB/MSB, ch 0 */
		outb_p(0x34, PIT_MODE);
		outb_p(LATCH & 0xff , PIT_CH0);	/* LSB */
		outb_p(LATCH >> 8 , PIT_CH0);		/* MSB */
	...

MIPS and ARM are the only other arches that use this driver. In
the MIPS case CLOCK_TICK_RATE is defined as the same value as
PIT_TICK_RATE. For ARM, the only machine that uses it is
Footbridge which has a totally bogus CLOCK_TICK_RATE according
to the comments. Furthermore, the clockevent_i8253_init()
initializes the clockevent with PIT_TIC_RATE, so there's
no reason to use the generic LATCH.

This is part of work to remove and depecrate the global
CLOCK_TICK_RATE symbol.

Signed-off-by: Deepak Saxena <dsaxena@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
2011-11-21 19:00:59 -08:00
..
acpi_pm.c time: x86: Remove CLOCK_TICK_RATE from acpi_pm clocksource driver 2011-11-21 19:00:58 -08:00
cs5535-clockevt.c Andres has moved 2010-07-20 16:25:41 -07:00
cyclone.c x86: Convert remaining x86 clocksources to clocksource_register_hz/khz 2011-02-21 13:33:33 -08:00
dw_apb_timer.c dw_apb_timer: constify clocksource name 2011-10-04 13:08:18 -07:00
i8253.c time: x86: Replace LATCH with PIT_LATCH in i8253 clocksource driver 2011-11-21 19:00:59 -08:00
Kconfig Merge branch 'timers-clocksource-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2011-07-23 10:34:47 -07:00
Makefile Merge branch 'timers-clocksource-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2011-07-23 10:34:47 -07:00
mmio.c clocksource: add common mmio clocksource 2011-05-23 18:04:51 +01:00
scx200_hrt.c clocksource: pass clocksource to read() callback 2009-04-21 13:41:47 -07:00
sh_cmt.c Revert "clocksource: sh_cmt: Runtime PM support" 2011-05-31 15:26:42 +09:00
sh_mtu2.c ARM: shmobile: remove sh_timer_config clk member 2010-10-31 10:40:39 -04:00
sh_tmu.c Revert "clocksource: sh_tmu: Runtime PM support" 2011-05-31 15:23:20 +09:00
tcb_clksrc.c drivers/clocksource/tcb_clksrc.c: fix init sequence 2011-01-26 10:50:04 +10:00