xref: /titanic_51/usr/src/uts/common/sys/bscbus.h (revision 1c42de6d020629af774dd9e9fc81be3f3ed9398e)
1*1c42de6dSgd78059 /*
2*1c42de6dSgd78059  * CDDL HEADER START
3*1c42de6dSgd78059  *
4*1c42de6dSgd78059  * The contents of this file are subject to the terms of the
5*1c42de6dSgd78059  * Common Development and Distribution License (the "License").
6*1c42de6dSgd78059  * You may not use this file except in compliance with the License.
7*1c42de6dSgd78059  *
8*1c42de6dSgd78059  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*1c42de6dSgd78059  * or http://www.opensolaris.org/os/licensing.
10*1c42de6dSgd78059  * See the License for the specific language governing permissions
11*1c42de6dSgd78059  * and limitations under the License.
12*1c42de6dSgd78059  *
13*1c42de6dSgd78059  * When distributing Covered Code, include this CDDL HEADER in each
14*1c42de6dSgd78059  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*1c42de6dSgd78059  * If applicable, add the following below this CDDL HEADER, with the
16*1c42de6dSgd78059  * fields enclosed by brackets "[]" replaced with your own identifying
17*1c42de6dSgd78059  * information: Portions Copyright [yyyy] [name of copyright owner]
18*1c42de6dSgd78059  *
19*1c42de6dSgd78059  * CDDL HEADER END
20*1c42de6dSgd78059  */
21*1c42de6dSgd78059 /*
22*1c42de6dSgd78059  * Copyright 2001-2003 Sun Microsystems, Inc.  All rights reserved.
23*1c42de6dSgd78059  * Use is subject to license terms.
24*1c42de6dSgd78059  */
25*1c42de6dSgd78059 
26*1c42de6dSgd78059 #ifndef	_SYS_BSCBUS_H
27*1c42de6dSgd78059 #define	_SYS_BSCBUS_H
28*1c42de6dSgd78059 
29*1c42de6dSgd78059 #pragma ident	"%Z%%M%	%I%	%E% SMI"
30*1c42de6dSgd78059 
31*1c42de6dSgd78059 #ifdef	__cplusplus
32*1c42de6dSgd78059 extern "C" {
33*1c42de6dSgd78059 #endif
34*1c42de6dSgd78059 
35*1c42de6dSgd78059 /*
36*1c42de6dSgd78059  * The bscbus nexus driver provides the same client interface as the lombus
37*1c42de6dSgd78059  * nexus driver.
38*1c42de6dSgd78059  */
39*1c42de6dSgd78059 #include <sys/lombus.h>
40*1c42de6dSgd78059 
41*1c42de6dSgd78059 /*
42*1c42de6dSgd78059  * Register spaces (as lombus.h but spaces now have a channel
43*1c42de6dSgd78059  * value encoded in it too)
44*1c42de6dSgd78059  *
45*1c42de6dSgd78059  *	Space*	Size	Range		Meaning
46*1c42de6dSgd78059  *		(bits)
47*1c42de6dSgd78059  *
48*1c42de6dSgd78059  *	xx00	8	[0 .. 16383]	LOM virtual registers
49*1c42de6dSgd78059  *	xx01	8	[0]		Watchdog pat (on write)
50*1c42de6dSgd78059  *	xx02	16	[0]		Async event info (read only)
51*1c42de6dSgd78059  *	All	32	[-4 .. -12]	Access handle fault info
52*1c42de6dSgd78059  *      * xx is the channel number.
53*1c42de6dSgd78059  */
54*1c42de6dSgd78059 
55*1c42de6dSgd78059 #define	LOMBUS_SPACE_TO_REGSET(rsp)	((rsp) & 0xff)
56*1c42de6dSgd78059 #define	LOMBUS_SPACE_TO_CHANNEL(rsp)	(((rsp) & 0xff00) >> 8)
57*1c42de6dSgd78059 #define	LOMBUS_SPACE(regset, channel)	((regset) | ((channel) << 8))
58*1c42de6dSgd78059 
59*1c42de6dSgd78059 #ifdef	__cplusplus
60*1c42de6dSgd78059 }
61*1c42de6dSgd78059 #endif
62*1c42de6dSgd78059 
63*1c42de6dSgd78059 #endif	/* _SYS_BSCBUS_H */
64