cardbus_cis.h revision 67276
167276Sjon/*
267276Sjon * Copyright (c) 2000,2001 Jonathan Chen.
367276Sjon * All rights reserved.
467276Sjon *
567276Sjon * Redistribution and use in source and binary forms, with or without
667276Sjon * modification, are permitted provided that the following conditions
767276Sjon * are met:
867276Sjon * 1. Redistributions of source code must retain the above copyright
967276Sjon *    notice, this list of conditions, and the following disclaimer,
1067276Sjon *    without modification, immediately at the beginning of the file.
1167276Sjon * 2. Redistributions in binary form must reproduce the above copyright
1267276Sjon *    notice, this list of conditions and the following disclaimer in
1367276Sjon *    the documentation and/or other materials provided with the
1467276Sjon *    distribution.
1567276Sjon *
1667276Sjon * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1767276Sjon * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1867276Sjon * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1967276Sjon * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
2067276Sjon * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2167276Sjon * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2267276Sjon * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2367276Sjon * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2467276Sjon * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2567276Sjon * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2667276Sjon * SUCH DAMAGE.
2767276Sjon *
2867276Sjon * $FreeBSD: head/sys/dev/cardbus/cardbus_cis.h 67276 2000-10-18 03:25:13Z jon $
2967276Sjon */
3067276Sjon
3167276Sjon/*
3267276Sjon * Cardbus CIS definitions
3367276Sjon */
3467276Sjon
3567276Sjonint cardbus_do_cis(device_t dev, device_t child);
3667276Sjon
3767276Sjon#define MAXTUPLESIZE		0x400
3867276Sjon
3967276Sjon/* CIS TUPLES */
4067276Sjon
4167276Sjon#define CISTPL_NULL		0x00
4267276Sjon#define CISTPL_DEVICE		0x01
4367276Sjon#define CISTPL_LONG_LINK_CB	0x02
4467276Sjon#define CISTPL_INDIRECT		0x03
4567276Sjon#define CISTPL_CONFIG_CB	0x04
4667276Sjon#define CISTPL_CFTABLE_ENTRY_CB	0x05
4767276Sjon#define CISTPL_LONGLINK_MFC	0x06
4867276Sjon#define CISTPL_BAR		0x07
4967276Sjon#define CISTPL_PWR_MGMNT	0x08
5067276Sjon#define CISTPL_EXTDEVICE	0x09
5167276Sjon#define CISTPL_CHECKSUM		0x10
5267276Sjon#define CISTPL_LONGLINK_A	0x11
5367276Sjon#define CISTPL_LONGLINK_C	0x12
5467276Sjon#define CISTPL_LINKTARGET	0x13
5567276Sjon#define CISTPL_NO_LINK		0x14
5667276Sjon#define CISTPL_VERS_1		0x15
5767276Sjon#define CISTPL_ALTSTR		0x16
5867276Sjon#define CISTPL_DEVICE_A		0x17
5967276Sjon#define CISTPL_JEDEC_C		0x18
6067276Sjon#define CISTPL_JEDEC_A		0x19
6167276Sjon#define CISTPL_CONFIG		0x1A
6267276Sjon#define CISTPL_CFTABLE_ENTRY	0x1B
6367276Sjon#define CISTPL_DEVICE_OC	0x1C
6467276Sjon#define CISTPL_DEVICE_OA	0x1D
6567276Sjon#define CISTPL_DEVICE_GEO	0x1E
6667276Sjon#define CISTPL_DEVICE_GEO_A	0x1F
6767276Sjon#define CISTPL_MANFID		0x20
6867276Sjon#define CISTPL_FUNCID		0x21
6967276Sjon#define CISTPL_FUNCE		0x22
7067276Sjon#define CISTPL_SWIL		0x23
7167276Sjon#define CISTPL_VERS_2		0x40
7267276Sjon#define CISTPL_FORMAT		0x41
7367276Sjon#define CISTPL_GEOMETRY		0x42
7467276Sjon#define CISTPL_BYTEORDER	0x43
7567276Sjon#define CISTPL_DATE		0x44
7667276Sjon#define CISTPL_BATTERY		0x45
7767276Sjon#define CISTPL_ORG		0x46
7867276Sjon#define CISTPL_END		0xFF
7967276Sjon
8067276Sjon/* BAR */
8167276Sjon#define TPL_BAR_REG_ASI_MASK	0x07
8267276Sjon#define TPL_BAR_REG_AS		0x08
8367276Sjon
8467276Sjon/* CISTPL_FUNC */
8567276Sjon#define TPL_FUNC_MF		0	/* multi function tuple */
8667276Sjon#define TPL_FUNC_MEM		1	/* memory */
8767276Sjon#define TPL_FUNC_SERIAL		2	/* serial, including modem and fax */
8867276Sjon#define TPL_FUNC_PARALLEL	3	/* parallel, including printer and SCSI */
8967276Sjon#define TPL_FUNC_DISK		4	/* Disk */
9067276Sjon#define TPL_FUNC_VIDEO		5	/* Video Adaptor */
9167276Sjon#define TPL_FUNC_LAN		6	/* LAN Adaptor */
9267276Sjon#define TPL_FUNC_AIMS		7	/* Auto Inclement Mass Strages */
9367276Sjon
9467276Sjon/* TPL_FUNC_LAN */
9567276Sjon#define TPL_FUNCE_LAN_TECH	1	/* technology */
9667276Sjon#define TPL_FUNCE_LAN_SPEED	2	/* speed */
9767276Sjon#define TPL_FUNCE_LAN_MEDIA	2	/* which media do you use? */
9867276Sjon#define TPL_FUNCE_LAN_NID	4	/* node id (address) */
9967276Sjon#define TPL_FUNCE_LAN_CONN	5	/* connector type (shape) */
100