blob: 8336b2f6f834627c462a0add39f4502aecfb5ed6 [file] [log] [blame]
Ralf Baechle334955e2011-06-01 19:04:57 +01001/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
Ralf Baechlecb2455a2011-06-01 19:04:58 +01005 *
6 * Machine specific IO port address definition for generic.
7 * Written by Osamu Tomita <tomita@cinet.co.jp>
Ralf Baechle334955e2011-06-01 19:04:57 +01008 */
9#ifndef __LINUX_I8253_H
10#define __LINUX_I8253_H
11
Ralf Baechle49cf3f22011-06-01 19:05:07 +010012#include <linux/param.h>
Ralf Baechlecb2455a2011-06-01 19:04:58 +010013#include <linux/spinlock.h>
Ralf Baechle49cf3f22011-06-01 19:05:07 +010014#include <linux/timex.h>
Ralf Baechle334955e2011-06-01 19:04:57 +010015
Ralf Baechlecb2455a2011-06-01 19:04:58 +010016/* i8253A PIT registers */
17#define PIT_MODE 0x43
18#define PIT_CH0 0x40
19#define PIT_CH2 0x42
20
Ralf Baechle49cf3f22011-06-01 19:05:07 +010021#define PIT_LATCH ((PIT_TICK_RATE + HZ/2) / HZ)
22
Ralf Baechlecb2455a2011-06-01 19:04:58 +010023extern raw_spinlock_t i8253_lock;
Michael Kelleyf6939db2018-11-04 03:48:54 +000024extern bool i8253_clear_counter_on_shutdown;
Thomas Gleixnere6220bd2011-06-09 13:08:25 +000025extern struct clock_event_device i8253_clockevent;
26extern void clockevent_i8253_init(bool oneshot);
Ralf Baechlecb2455a2011-06-01 19:04:58 +010027
Ralf Baechle85049272011-06-01 19:05:08 +010028extern void setup_pit_timer(void);
29
Ralf Baechle334955e2011-06-01 19:04:57 +010030#endif /* __LINUX_I8253_H */