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$ 2767276Sjon */ 2867276Sjon 2967276Sjon/* 3067276Sjon * Cardbus CIS definitions 3167276Sjon */ 32141412Simpint cardbus_do_cis(device_t, device_t); 3367276Sjon 3470715Sjonstruct cis_tupleinfo; 3570715Sjon 3682375Sjon#define MAXTUPLESIZE 0x400 3767276Sjon 3867276Sjon/* BAR */ 3982375Sjon#define TPL_BAR_REG_ASI_MASK 0x07 4082375Sjon#define TPL_BAR_REG_AS 0x10 4182378Sjon#define TPL_BAR_REG_PREFETCHABLE_ONLY 0x20 4282378Sjon#define TPL_BAR_REG_PREFETCHABLE_CACHEABLE 0x40 4382378Sjon#define TPL_BAR_REG_PREFETCHABLE 0x60 4482378Sjon#define TPL_BAR_REG_BELOW1MB 0x80 45