xref: /OK3568_Linux_fs/kernel/include/linux/i8253.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * This file is subject to the terms and conditions of the GNU General Public
3*4882a593Smuzhiyun  * License.  See the file "COPYING" in the main directory of this archive
4*4882a593Smuzhiyun  * for more details.
5*4882a593Smuzhiyun  *
6*4882a593Smuzhiyun  *  Machine specific IO port address definition for generic.
7*4882a593Smuzhiyun  *  Written by Osamu Tomita <tomita@cinet.co.jp>
8*4882a593Smuzhiyun  */
9*4882a593Smuzhiyun #ifndef __LINUX_I8253_H
10*4882a593Smuzhiyun #define __LINUX_I8253_H
11*4882a593Smuzhiyun 
12*4882a593Smuzhiyun #include <linux/param.h>
13*4882a593Smuzhiyun #include <linux/spinlock.h>
14*4882a593Smuzhiyun #include <linux/timex.h>
15*4882a593Smuzhiyun 
16*4882a593Smuzhiyun /* i8253A PIT registers */
17*4882a593Smuzhiyun #define PIT_MODE	0x43
18*4882a593Smuzhiyun #define PIT_CH0		0x40
19*4882a593Smuzhiyun #define PIT_CH2		0x42
20*4882a593Smuzhiyun 
21*4882a593Smuzhiyun #define PIT_LATCH	((PIT_TICK_RATE + HZ/2) / HZ)
22*4882a593Smuzhiyun 
23*4882a593Smuzhiyun extern raw_spinlock_t i8253_lock;
24*4882a593Smuzhiyun extern bool i8253_clear_counter_on_shutdown;
25*4882a593Smuzhiyun extern struct clock_event_device i8253_clockevent;
26*4882a593Smuzhiyun extern void clockevent_i8253_init(bool oneshot);
27*4882a593Smuzhiyun 
28*4882a593Smuzhiyun extern void setup_pit_timer(void);
29*4882a593Smuzhiyun 
30*4882a593Smuzhiyun #endif /* __LINUX_I8253_H */
31