cardbus_cis.h revision 139749
1139749Simp/*-
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 139749 2005-01-06 01:43:34Z imp $
2967276Sjon */
3067276Sjon
3167276Sjon/*
3267276Sjon * Cardbus CIS definitions
3367276Sjon */
3467276Sjon
3570715Sjonstruct cis_tupleinfo;
3670715Sjon
3782375Sjonint	cardbus_do_cis(device_t, device_t);
3867276Sjon
3982375Sjon#define	MAXTUPLESIZE		0x400
4067276Sjon
4167276Sjon/* BAR */
4282375Sjon#define	TPL_BAR_REG_ASI_MASK			0x07
4382375Sjon#define	TPL_BAR_REG_AS				0x10
4482378Sjon#define	TPL_BAR_REG_PREFETCHABLE_ONLY		0x20
4582378Sjon#define	TPL_BAR_REG_PREFETCHABLE_CACHEABLE	0x40
4682378Sjon#define	TPL_BAR_REG_PREFETCHABLE		0x60
4782378Sjon#define	TPL_BAR_REG_BELOW1MB			0x80
4867276Sjon
4967276Sjon/* CISTPL_FUNC */
5082375Sjon#define	TPL_FUNC_MF		0	/* multi function tuple */
5182375Sjon#define	TPL_FUNC_MEM		1	/* memory */
5282375Sjon#define	TPL_FUNC_SERIAL		2	/* serial, including modem and fax */
5382375Sjon#define	TPL_FUNC_PARALLEL	3	/* parallel, including printer and SCSI */
5482375Sjon#define	TPL_FUNC_DISK		4	/* Disk */
5582375Sjon#define	TPL_FUNC_VIDEO		5	/* Video Adaptor */
5682375Sjon#define	TPL_FUNC_LAN		6	/* LAN Adaptor */
5782375Sjon#define	TPL_FUNC_AIMS		7	/* Auto Inclement Mass Strages */
5867276Sjon
5967276Sjon/* TPL_FUNC_LAN */
6082375Sjon#define	TPL_FUNCE_LAN_TECH	1	/* technology */
6182375Sjon#define	TPL_FUNCE_LAN_SPEED	2	/* speed */
62107301Simp#define	TPL_FUNCE_LAN_MEDIA	3	/* which media do you use? */
6382375Sjon#define	TPL_FUNCE_LAN_NID	4	/* node id (address) */
6482375Sjon#define	TPL_FUNCE_LAN_CONN	5	/* connector type (shape) */
65107301Simp
66107301Simp/* TPL_FUNC_SERIAL */
67107301Simp#define	TPL_FUNCE_SER_UART	0	/* UART type */
68