xref: /freebsd/sys/dev/pccard/pccardreg.h (revision 71625ec9ad2a9bc8c09784fbd23b759830e0ee5f)
1 /*	$NetBSD: pcmciareg.h,v 1.7 1998/10/29 09:45:52 enami Exp $	*/
2 
3 /*-
4  * SPDX-License-Identifier: BSD-4-Clause
5  *
6  * Copyright (c) 1997 Marc Horowitz.  All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  * 1. Redistributions of source code must retain the above copyright
12  *    notice, this list of conditions and the following disclaimer.
13  * 2. Redistributions in binary form must reproduce the above copyright
14  *    notice, this list of conditions and the following disclaimer in the
15  *    documentation and/or other materials provided with the distribution.
16  * 3. All advertising materials mentioning features or use of this software
17  *    must display the following acknowledgement:
18  *	This product includes software developed by Marc Horowitz.
19  * 4. The name of the author may not be used to endorse or promote products
20  *    derived from this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  */
33 
34 /*
35  * Card Configuration Registers
36  */
37 
38 #define	PCCARD_CCR_OPTION			0x00
39 #define	PCCARD_CCR_OPTION_SRESET			0x80
40 #define	PCCARD_CCR_OPTION_LEVIREQ			0x40
41 #define	PCCARD_CCR_OPTION_CFINDEX			0x3F
42 #define	PCCARD_CCR_OPTION_IREQ_ENABLE			0x04
43 #define	PCCARD_CCR_OPTION_ADDR_DECODE			0x02
44 #define	PCCARD_CCR_OPTION_FUNC_ENABLE			0x01
45 #define	PCCARD_CCR_STATUS			0x02
46 #define	PCCARD_CCR_STATUS_PINCHANGED			0x80
47 #define	PCCARD_CCR_STATUS_SIGCHG			0x40
48 #define	PCCARD_CCR_STATUS_IOIS8				0x20
49 #define	PCCARD_CCR_STATUS_RESERVED1			0x10
50 #define	PCCARD_CCR_STATUS_AUDIO				0x08
51 #define	PCCARD_CCR_STATUS_PWRDWN			0x04
52 #define	PCCARD_CCR_STATUS_INTR				0x02
53 #define	PCCARD_CCR_STATUS_INTRACK			0x01
54 #define	PCCARD_CCR_PIN				0x04
55 #define	PCCARD_CCR_PIN_CBVD1				0x80
56 #define	PCCARD_CCR_PIN_CBVD2				0x40
57 #define	PCCARD_CCR_PIN_CRDYBSY				0x20
58 #define	PCCARD_CCR_PIN_CWPROT				0x10
59 #define	PCCARD_CCR_PIN_RBVD1				0x08
60 #define	PCCARD_CCR_PIN_RBVD2				0x04
61 #define	PCCARD_CCR_PIN_RRDYBSY				0x02
62 #define	PCCARD_CCR_PIN_RWPROT				0x01
63 #define	PCCARD_CCR_SOCKETCOPY			0x06
64 #define	PCCARD_CCR_SOCKETCOPY_RESERVED			0x80
65 #define	PCCARD_CCR_SOCKETCOPY_COPY_MASK			0x70
66 #define	PCCARD_CCR_SOCKETCOPY_COPY_SHIFT		4
67 #define	PCCARD_CCR_SOCKETCOPY_SOCKET_MASK		0x0F
68 #define PCCARD_CCR_EXTSTATUS			0x08
69 #define	PCCARD_CCR_IOBASE0			0x0A
70 #define	PCCARD_CCR_IOBASE1			0x0C
71 #define	PCCARD_CCR_IOBASE2			0x0E
72 #define	PCCARD_CCR_IOBASE3			0x10
73 #define	PCCARD_CCR_IOSIZE			0x12
74 
75 #define	PCCARD_CCR_SIZE				0x14
76