1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 /*
26  * Copyright (c)  * Copyright (c) 2001 Tadpole Technology plc
27  * All rights reserved.
28  */
29 
30 #ifndef	_SYS_CARDBUS_CFG_H
31 #define	_SYS_CARDBUS_CFG_H
32 
33 #ifdef  __cplusplus
34 extern "C" {
35 #endif
36 
37 /*
38  * Cardbus device identifiers
39  */
40 #define	CBUS_ID(vend, dev)	((uint32_t)(((uint32_t)(vend) << 16) | (dev)))
41 
42 #define	CB_PPD_CODE	0x2441
43 
44 struct cardbus_parent_private_data {
45 	struct ddi_parent_private_data	ppd;	/* this format for prtconf */
46 	uint16_t	code;	/* == CB_PPD_CODE */
47 	/* pci_regspec_t *regs; */
48 };
49 
50 extern kmutex_t cardbus_list_mutex;
51 extern int cardbus_latency_timer;
52 
53 extern int cardbus_configure(cbus_t *cbp);
54 extern int cardbus_unconfigure(cbus_t *cbp);
55 extern int cardbus_teardown_device(dev_info_t *);
56 extern int cardbus_primary_busno(dev_info_t *dip);
57 
58 #ifdef DEBUG
59 extern void cardbus_dump_children(dev_info_t *dip, int level);
60 extern void cardbus_dump_family_tree(dev_info_t *dip);
61 #endif
62 
63 #ifdef  __cplusplus
64 }
65 #endif
66 
67 #endif	/* _SYS_CARDBUS_CFG_H */
68