xref: /titanic_51/usr/src/uts/sun4u/starcat/sys/sc_cvc.h (revision 03831d35f7499c87d51205817c93e9a8d42c4bae)
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, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef _SYS_SC_CVC_H
28 #define	_SYS_SC_CVC_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 
37 #define	CVC_IOSRAM_POLL_USECS	100000
38 
39 #if defined(DEBUG)
40 
41 #define	CVC_DBG_ATTACH		0x0001
42 #define	CVC_DBG_DETACH		0x0002
43 #define	CVC_DBG_OPEN		0x0004
44 #define	CVC_DBG_CLOSE		0x0008
45 #define	CVC_DBG_IOCTL		0x0010
46 #define	CVC_DBG_REDIR		0x0020
47 #define	CVC_DBG_WPUT		0x0040
48 #define	CVC_DBG_WSRV		0x0080
49 #define	CVC_DBG_IOSRAM_WR	0x0100
50 #define	CVC_DBG_IOSRAM_RD	0x0200
51 #define	CVC_DBG_NETWORK_WR	0x0400
52 #define	CVC_DBG_NETWORK_RD	0x0800
53 #define	CVC_DBG_IOSRAM_CNTL	0x1000
54 
55 
56 #define	CVC_DBG0(flag, fmt) \
57 	cvc_dbg(flag, fmt, 0, 0, 0, 0, 0);
58 #define	CVC_DBG1(flag, fmt, a1) \
59 	cvc_dbg(flag, fmt, (uintptr_t)(a1), 0, 0, 0, 0);
60 #define	CVC_DBG2(flag, fmt, a1, a2) \
61 	cvc_dbg(flag, fmt, (uintptr_t)(a1), (uintptr_t)(a2), 0, 0, 0);
62 #define	CVC_DBG3(flag, fmt, a1, a2, a3) \
63 	cvc_dbg(flag, fmt, (uintptr_t)(a1), (uintptr_t)(a2), \
64 		(uintptr_t)(a3), 0, 0);
65 #define	CVC_DBG4(flag, fmt, a1, a2, a3, a4) \
66 	cvc_dbg(flag, fmt, (uintptr_t)(a1), (uintptr_t)(a2), \
67 		(uintptr_t)(a3), (uintptr_t)(a4), 0);
68 #define	CVC_DBG5(flag, fmt, a1, a2, a3, a4, a5) \
69 	cvc_dbg(flag, fmt, (uintptr_t)(a1), (uintptr_t)(a2), \
70 		(uintptr_t)(a3), (uintptr_t)(a4), (uintptr_t)(a5));
71 
72 #else /* DEBUG */
73 
74 #define	CVC_DBG0(flag, fmt)
75 #define	CVC_DBG1(flag, fmt, a1)
76 #define	CVC_DBG2(flag, fmt, a1, a2)
77 #define	CVC_DBG3(flag, fmt, a1, a2, a3)
78 #define	CVC_DBG4(flag, fmt, a1, a2, a3, a4)
79 #define	CVC_DBG5(flag, fmt, a1, a2, a3, a4, a5)
80 
81 #endif /* DEBUG */
82 
83 
84 #ifdef	__cplusplus
85 }
86 #endif
87 
88 #endif	/* _SYS_SC_CVC_H */
89