cardbus_cis.h revision 67276
1/*
2 * Copyright (c) 2000,2001 Jonathan Chen.
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 *    without modification, immediately at the beginning of the file.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 *    notice, this list of conditions and the following disclaimer in
13 *    the documentation and/or other materials provided with the
14 *    distribution.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
20 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * $FreeBSD: head/sys/dev/cardbus/cardbus_cis.h 67276 2000-10-18 03:25:13Z jon $
29 */
30
31/*
32 * Cardbus CIS definitions
33 */
34
35int cardbus_do_cis(device_t dev, device_t child);
36
37#define MAXTUPLESIZE		0x400
38
39/* CIS TUPLES */
40
41#define CISTPL_NULL		0x00
42#define CISTPL_DEVICE		0x01
43#define CISTPL_LONG_LINK_CB	0x02
44#define CISTPL_INDIRECT		0x03
45#define CISTPL_CONFIG_CB	0x04
46#define CISTPL_CFTABLE_ENTRY_CB	0x05
47#define CISTPL_LONGLINK_MFC	0x06
48#define CISTPL_BAR		0x07
49#define CISTPL_PWR_MGMNT	0x08
50#define CISTPL_EXTDEVICE	0x09
51#define CISTPL_CHECKSUM		0x10
52#define CISTPL_LONGLINK_A	0x11
53#define CISTPL_LONGLINK_C	0x12
54#define CISTPL_LINKTARGET	0x13
55#define CISTPL_NO_LINK		0x14
56#define CISTPL_VERS_1		0x15
57#define CISTPL_ALTSTR		0x16
58#define CISTPL_DEVICE_A		0x17
59#define CISTPL_JEDEC_C		0x18
60#define CISTPL_JEDEC_A		0x19
61#define CISTPL_CONFIG		0x1A
62#define CISTPL_CFTABLE_ENTRY	0x1B
63#define CISTPL_DEVICE_OC	0x1C
64#define CISTPL_DEVICE_OA	0x1D
65#define CISTPL_DEVICE_GEO	0x1E
66#define CISTPL_DEVICE_GEO_A	0x1F
67#define CISTPL_MANFID		0x20
68#define CISTPL_FUNCID		0x21
69#define CISTPL_FUNCE		0x22
70#define CISTPL_SWIL		0x23
71#define CISTPL_VERS_2		0x40
72#define CISTPL_FORMAT		0x41
73#define CISTPL_GEOMETRY		0x42
74#define CISTPL_BYTEORDER	0x43
75#define CISTPL_DATE		0x44
76#define CISTPL_BATTERY		0x45
77#define CISTPL_ORG		0x46
78#define CISTPL_END		0xFF
79
80/* BAR */
81#define TPL_BAR_REG_ASI_MASK	0x07
82#define TPL_BAR_REG_AS		0x08
83
84/* CISTPL_FUNC */
85#define TPL_FUNC_MF		0	/* multi function tuple */
86#define TPL_FUNC_MEM		1	/* memory */
87#define TPL_FUNC_SERIAL		2	/* serial, including modem and fax */
88#define TPL_FUNC_PARALLEL	3	/* parallel, including printer and SCSI */
89#define TPL_FUNC_DISK		4	/* Disk */
90#define TPL_FUNC_VIDEO		5	/* Video Adaptor */
91#define TPL_FUNC_LAN		6	/* LAN Adaptor */
92#define TPL_FUNC_AIMS		7	/* Auto Inclement Mass Strages */
93
94/* TPL_FUNC_LAN */
95#define TPL_FUNCE_LAN_TECH	1	/* technology */
96#define TPL_FUNCE_LAN_SPEED	2	/* speed */
97#define TPL_FUNCE_LAN_MEDIA	2	/* which media do you use? */
98#define TPL_FUNCE_LAN_NID	4	/* node id (address) */
99#define TPL_FUNCE_LAN_CONN	5	/* connector type (shape) */
100