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