1146211Snyan/*-
2146211Snyan * Copyright (C) 2005 TAKAHASHI Yoshihiro. All rights reserved.
3146211Snyan *
4146211Snyan * Redistribution and use in source and binary forms, with or without
5146211Snyan * modification, are permitted provided that the following conditions
6146211Snyan * are met:
7146211Snyan * 1. Redistributions of source code must retain the above copyright
8146211Snyan *    notice, this list of conditions and the following disclaimer.
9146211Snyan * 2. Redistributions in binary form must reproduce the above copyright
10146211Snyan *    notice, this list of conditions and the following disclaimer in the
11146211Snyan *    documentation and/or other materials provided with the distribution.
12146211Snyan *
13146211Snyan * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14146211Snyan * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15146211Snyan * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16146211Snyan * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
17146211Snyan * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18146211Snyan * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19146211Snyan * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20146211Snyan * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21146211Snyan * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22146211Snyan * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23146211Snyan * SUCH DAMAGE.
24146211Snyan *
25146211Snyan * $FreeBSD$
26146211Snyan */
27146211Snyan
28146211Snyan/*
29146211Snyan * The outputs of the three timers are connected as follows:
30146211Snyan *
31146211Snyan *	 timer 0 -> irq 0
32146211Snyan *	 timer 1 -> speaker (via keyboard controller)
33146211Snyan * 	 timer 2 -> RS-232C
34146211Snyan *
35146211Snyan * Timer 0 is used to call hardclock.
36146211Snyan * Timer 1 is used to generate console beeps.
37146211Snyan */
38146211Snyan
39146211Snyan#ifndef _MACHINE_TIMERREG_H_
40146211Snyan#define _MACHINE_TIMERREG_H_
41146211Snyan
42146211Snyan#ifdef _KERNEL
43146211Snyan
44146211Snyan#include <dev/ic/i8253reg.h>
45146211Snyan
46146211Snyan#define	IO_TIMER1	0x71		/* 8253C Timer */
47146211Snyan#define	TIMER_CNTR0	(IO_TIMER1 + TIMER_REG_CNTR0 * 2)
48146211Snyan#define	TIMER_CNTR1	0x3fdb
49146211Snyan#define	TIMER_CNTR2	(IO_TIMER1 + TIMER_REG_CNTR2 * 2)
50146211Snyan#define	TIMER_MODE	(IO_TIMER1 + TIMER_REG_MODE * 2)
51146211Snyan
52146211Snyan#endif /* _KERNEL */
53146211Snyan
54146211Snyan#endif /* _MACHINE_TIMERREG_H_ */
55