xref: /freebsd/sys/dev/cardbus/cardbus_cis.h (revision 95ee2897e98f5d444f26ed2334cc7c439f9c16c6)
1098ca2bdSWarner Losh /*-
2*4d846d26SWarner Losh  * SPDX-License-Identifier: BSD-2-Clause
3718cf2ccSPedro F. Giffuni  *
40db7e66cSJonathan Chen  * Copyright (c) 2000,2001 Jonathan Chen.
50db7e66cSJonathan Chen  * All rights reserved.
60db7e66cSJonathan Chen  *
70db7e66cSJonathan Chen  * Redistribution and use in source and binary forms, with or without
80db7e66cSJonathan Chen  * modification, are permitted provided that the following conditions
90db7e66cSJonathan Chen  * are met:
100db7e66cSJonathan Chen  * 1. Redistributions of source code must retain the above copyright
112dd5c91eSWarner Losh  *    notice, this list of conditions and the following disclaimer.
120db7e66cSJonathan Chen  * 2. Redistributions in binary form must reproduce the above copyright
132dd5c91eSWarner Losh  *    notice, this list of conditions and the following disclaimer in the
142dd5c91eSWarner Losh  *    documentation and/or other materials provided with the distribution.
150db7e66cSJonathan Chen  *
160db7e66cSJonathan Chen  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
170db7e66cSJonathan Chen  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
180db7e66cSJonathan Chen  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
192dd5c91eSWarner Losh  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
202dd5c91eSWarner Losh  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
210db7e66cSJonathan Chen  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
220db7e66cSJonathan Chen  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
230db7e66cSJonathan Chen  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
240db7e66cSJonathan Chen  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
250db7e66cSJonathan Chen  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
260db7e66cSJonathan Chen  * SUCH DAMAGE.
270db7e66cSJonathan Chen  */
280db7e66cSJonathan Chen 
290db7e66cSJonathan Chen /*
300db7e66cSJonathan Chen  * Cardbus CIS definitions
310db7e66cSJonathan Chen  */
32440b5adeSWarner Losh int	cardbus_do_cis(device_t, device_t);
330db7e66cSJonathan Chen 
340c95c705SJonathan Chen struct cis_tupleinfo;
350c95c705SJonathan Chen 
360db7e66cSJonathan Chen #define	MAXTUPLESIZE		0x400
370db7e66cSJonathan Chen 
380db7e66cSJonathan Chen /* BAR */
390db7e66cSJonathan Chen #define	TPL_BAR_REG_ASI_MASK			0x07
40d58b9dbcSJonathan Chen #define	TPL_BAR_REG_AS				0x10
4163fa9f4cSJonathan Chen #define	TPL_BAR_REG_PREFETCHABLE_ONLY		0x20
4263fa9f4cSJonathan Chen #define	TPL_BAR_REG_PREFETCHABLE_CACHEABLE	0x40
4363fa9f4cSJonathan Chen #define	TPL_BAR_REG_PREFETCHABLE		0x60
4463fa9f4cSJonathan Chen #define	TPL_BAR_REG_BELOW1MB			0x80
45