xref: /freebsd/contrib/pnpinfo/pnpinfo.h (revision 6b7b2d80ed4d728d3ffd12c422e57798c1b63a84)
1 /*
2  * Copyright (c) 1996, Sujal M. Patel
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  * 3. All advertising materials mentioning features or use of this software
14  *    must display the following acknowledgement:
15  *      This product includes software developed by Sujal M. Patel
16  * 4. Neither the name of the author nor the names of any co-contributors
17  *    may be used to endorse or promote products derived from this software
18  *    without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
21  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
24  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30  * SUCH DAMAGE.
31  *
32  * $FreeBSD$
33  */
34 
35 
36 /* Maximum Number of PnP Devices.  6 should be plenty */
37 #define MAX_CARDS 6
38 
39 
40 /* Static ports */
41 #define ADDRESS			0x279
42 #define WRITE_DATA		0xa79
43 
44 
45 /* PnP Registers.  Write to ADDRESS and then use WRITE/READ_DATA */
46 #define SET_RD_DATA		0x00
47 #define SERIAL_ISOLATION	0x01
48 #define WAKE			0x03
49 #define	RESOURCE_DATA		0x04
50 #define STATUS			0x05
51 #define SET_CSN			0x06
52 
53 /* Small Resource Item names */
54 #define PNP_VERSION		0x1
55 #define LOG_DEVICE_ID		0x2
56 #define COMP_DEVICE_ID		0x3
57 #define IRQ_FORMAT		0x4
58 #define DMA_FORMAT		0x5
59 #define START_DEPEND_FUNC	0x6
60 #define END_DEPEND_FUNC		0x7
61 #define IO_PORT_DESC		0x8
62 #define FIXED_IO_PORT_DESC	0x9
63 #define SM_RES_RESERVED		0xa-0xd
64 #define SM_VENDOR_DEFINED	0xe
65 #define END_TAG			0xf
66 
67 /* Large Resource Item names */
68 #define MEMORY_RANGE_DESC	0x1
69 #define ID_STRING_ANSI		0x2
70 #define ID_STRING_UNICODE	0x3
71 #define LG_VENDOR_DEFINED	0x4
72 #define _32BIT_MEM_RANGE_DESC	0x5
73 #define _32BIT_FIXED_LOC_DESC	0x6
74 #define LG_RES_RESERVED		0x7-0x7f
75