]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - sys/dev/sio/siovar.h
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / sys / dev / sio / siovar.h
1 /*-
2  * Copyright (c) 1991 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  * 4. Neither the name of the University nor the names of its contributors
14  *    may be used to endorse or promote products derived from this software
15  *    without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27  * SUCH DAMAGE.
28  *
29  * $FreeBSD$
30  */
31
32 #ifdef PC98
33 #define COM_IF_INTERNAL         0x00
34 #define COM_IF_PC9861K_1        0x01
35 #define COM_IF_PC9861K_2        0x02
36 #define COM_IF_IND_SS_1         0x03
37 #define COM_IF_IND_SS_2         0x04
38 #define COM_IF_PIO9032B_1       0x05
39 #define COM_IF_PIO9032B_2       0x06
40 #define COM_IF_B98_01_1         0x07
41 #define COM_IF_B98_01_2         0x08
42 #define COM_IF_END1             COM_IF_B98_01_2
43 #define COM_IF_RSA98            0x10    /* same as COM_IF_NS16550 */
44 #define COM_IF_NS16550          0x11
45 #define COM_IF_SECOND_CCU       0x12    /* same as COM_IF_NS16550 */
46 #define COM_IF_MC16550II        0x13
47 #define COM_IF_MCRS98           0x14    /* same as COM_IF_MC16550II */
48 #define COM_IF_RSB3000          0x15
49 #define COM_IF_RSB384           0x16
50 #define COM_IF_MODEM_CARD       0x17
51 #define COM_IF_RSA98III         0x18
52 #define COM_IF_ESP98            0x19
53 #define COM_IF_END2             COM_IF_ESP98
54
55 #define GET_IFTYPE(type)        (((type) >> 24) & 0x1f)
56 #define SET_IFTYPE(type)        ((type) << 24)
57
58 #define SET_FLAG(dev, bit) device_set_flags(dev, device_get_flags(dev) | (bit))
59 #define CLR_FLAG(dev, bit) device_set_flags(dev, device_get_flags(dev) & ~(bit))
60 #endif /* PC98 */
61
62 int     sioattach(device_t dev, int xrid, u_long rclk);
63 int     siodetach(device_t dev);
64 int     sioprobe(device_t dev, int xrid, u_long rclk, int noprobe);
65
66 extern  devclass_t      sio_devclass;
67 extern  char            sio_driver_name[];