1203829Smarius/*-
2203829Smarius * Copyright (c) 2010 Marius Strobl <marius@FreeBSD.org>
3203829Smarius * All rights reserved.
4203829Smarius *
5203829Smarius * Redistribution and use in source and binary forms, with or without
6203829Smarius * modification, are permitted provided that the following conditions
7203829Smarius * are met:
8203829Smarius * 1. Redistributions of source code must retain the above copyright
9203829Smarius *    notice, this list of conditions and the following disclaimer.
10203829Smarius * 2. Redistributions in binary form must reproduce the above copyright
11203829Smarius *    notice, this list of conditions and the following disclaimer in the
12203829Smarius *    documentation and/or other materials provided with the distribution.
13203829Smarius *
14203829Smarius * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15203829Smarius * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16203829Smarius * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17203829Smarius * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18203829Smarius * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19203829Smarius * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20203829Smarius * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21203829Smarius * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22203829Smarius * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23203829Smarius * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24203829Smarius * SUCH DAMAGE.
25203829Smarius *
26203829Smarius * $FreeBSD$
27203829Smarius */
28203829Smarius
29203829Smarius#ifndef _MACHINE_JBUS_H_
30203829Smarius#define	_MACHINE_JBUS_H_
31203829Smarius
32203829Smarius#define	JBUS_CR_JID_SHIFT	(17)
33203829Smarius#define	JBUS_CR_JID_SIZE	(3)
34203829Smarius#define	JBUS_CR_JID_MASK						\
35203829Smarius	(((1 << JBUS_CR_JID_SIZE) - 1) << JBUS_CR_JID_SHIFT)
36203829Smarius
37203829Smarius#define	JBUS_CR_GET_JID(cr)	((cr & JBUS_CR_JID_MASK) >> JBUS_CR_JID_SHIFT)
38203829Smarius
39203829Smarius#endif /* _MACHINE_JBUS_H_ */
40