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

Commit 08604bd9 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Linus Torvalds
Browse files

time: move PIT_TICK_RATE to linux/timex.h



PIT_TICK_RATE is currently defined in four architectures, but in three
different places.  While linux/timex.h is not the perfect place for it, it
is still a reasonable replacement for those drivers that traditionally use
asm/timex.h to get CLOCK_TICK_RATE and expect it to be the PIT frequency.

Note that for Alpha, the actual value changed from 1193182UL to 1193180UL.
 This is unlikely to make a difference, and probably can only improve
accuracy.  There was a discussion on the correct value of CLOCK_TICK_RATE
a few years ago, after which every existing instance was getting changed
to 1193182.  According to the specification, it should be
1193181.818181...

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Len Brown <lenb@kernel.org>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 03347e25
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
/*
 * 8253/8254 Programmable Interval Timer
 */

#ifndef _8253PIT_H
#define _8253PIT_H

#define PIT_TICK_RATE 	1193180UL

#endif
+1 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
#include <linux/sched.h>
#include <linux/pci.h>
#include <linux/ioport.h>
#include <linux/timex.h>
#include <linux/init.h>

#include <asm/ptrace.h>
+0 −2
Original line number Diff line number Diff line
@@ -12,8 +12,6 @@
#define PIT_CH0			0x40
#define PIT_CH2			0x42

#define PIT_TICK_RATE		1193182UL

extern spinlock_t i8253_lock;

extern void setup_pit_timer(void);
+0 −7
Original line number Diff line number Diff line
#ifndef _ASM_POWERPC_8253PIT_H
#define _ASM_POWERPC_8253PIT_H

/*
 * 8253/8254 Programmable Interval Timer
 */

#define PIT_TICK_RATE	1193182UL

#endif	/* _ASM_POWERPC_8253PIT_H */
+1 −3
Original line number Diff line number Diff line
@@ -4,9 +4,7 @@
#include <asm/processor.h>
#include <asm/tsc.h>

/* The PIT ticks at this frequency (in HZ): */
#define PIT_TICK_RATE		1193182

/* Assume we use the PIT time source for the clock tick */
#define CLOCK_TICK_RATE		PIT_TICK_RATE

#define ARCH_HAS_READ_CURRENT_TIMER
Loading