cardbus_cis.h revision 140198
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 9140198Simp * notice, this list of conditions and the following disclaimer. 1067276Sjon * 2. Redistributions in binary form must reproduce the above copyright 11140198Simp * notice, this list of conditions and the following disclaimer in the 12140198Simp * documentation and/or other materials provided with the distribution. 1367276Sjon * 1467276Sjon * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1567276Sjon * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1667276Sjon * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17140198Simp * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18140198Simp * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1967276Sjon * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2067276Sjon * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2167276Sjon * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2267276Sjon * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2367276Sjon * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2467276Sjon * SUCH DAMAGE. 2567276Sjon * 2667276Sjon * $FreeBSD: head/sys/dev/cardbus/cardbus_cis.h 140198 2005-01-13 19:12:10Z imp $ 2767276Sjon */ 2867276Sjon 2967276Sjon/* 3067276Sjon * Cardbus CIS definitions 3167276Sjon */ 3267276Sjon 3370715Sjonstruct cis_tupleinfo; 3470715Sjon 3582375Sjonint cardbus_do_cis(device_t, device_t); 3667276Sjon 3782375Sjon#define MAXTUPLESIZE 0x400 3867276Sjon 3967276Sjon/* BAR */ 4082375Sjon#define TPL_BAR_REG_ASI_MASK 0x07 4182375Sjon#define TPL_BAR_REG_AS 0x10 4282378Sjon#define TPL_BAR_REG_PREFETCHABLE_ONLY 0x20 4382378Sjon#define TPL_BAR_REG_PREFETCHABLE_CACHEABLE 0x40 4482378Sjon#define TPL_BAR_REG_PREFETCHABLE 0x60 4582378Sjon#define TPL_BAR_REG_BELOW1MB 0x80 4667276Sjon 4767276Sjon/* CISTPL_FUNC */ 4882375Sjon#define TPL_FUNC_MF 0 /* multi function tuple */ 4982375Sjon#define TPL_FUNC_MEM 1 /* memory */ 5082375Sjon#define TPL_FUNC_SERIAL 2 /* serial, including modem and fax */ 5182375Sjon#define TPL_FUNC_PARALLEL 3 /* parallel, including printer and SCSI */ 5282375Sjon#define TPL_FUNC_DISK 4 /* Disk */ 5382375Sjon#define TPL_FUNC_VIDEO 5 /* Video Adaptor */ 5482375Sjon#define TPL_FUNC_LAN 6 /* LAN Adaptor */ 5582375Sjon#define TPL_FUNC_AIMS 7 /* Auto Inclement Mass Strages */ 5667276Sjon 5767276Sjon/* TPL_FUNC_LAN */ 5882375Sjon#define TPL_FUNCE_LAN_TECH 1 /* technology */ 5982375Sjon#define TPL_FUNCE_LAN_SPEED 2 /* speed */ 60107301Simp#define TPL_FUNCE_LAN_MEDIA 3 /* which media do you use? */ 6182375Sjon#define TPL_FUNCE_LAN_NID 4 /* node id (address) */ 6282375Sjon#define TPL_FUNCE_LAN_CONN 5 /* connector type (shape) */ 63107301Simp 64107301Simp/* TPL_FUNC_SERIAL */ 65107301Simp#define TPL_FUNCE_SER_UART 0 /* UART type */ 66