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