i2otypes.h revision 96615
1/****************************************************************
2 * Copyright (c) 1996-2000 Distributed Processing Technology Corporation
3 * Copyright (c) 2000 Adaptec Corporation.
4 * All rights reserved.
5 *
6 * Copyright 1999 I2O Special Interest Group (I2O SIG).	 All rights reserved.
7 * All rights reserved
8 *
9 * TERMS AND CONDITIONS OF USE
10 *
11 * Redistribution and use in source form, with or without modification, are
12 * permitted provided that redistributions of source code must retain the
13 * above copyright notice, this list of conditions and the following disclaimer.
14 *
15 * This software is provided `as is' by Distributed Processing Technology and
16 * any express or implied warranties, including, but not limited to, the
17 * implied warranties of merchantability and fitness for a particular purpose,
18 * are disclaimed. In no event shall Distributed Processing Technology be
19 * liable for any direct, indirect, incidental, special, exemplary or
20 * consequential damages (including, but not limited to, procurement of
21 * substitute goods or services; loss of use, data, or profits; or business
22 * interruptions) however caused and on any theory of liability, whether in
23 * contract, strict liability, or tort (including negligence or otherwise)
24 * arising in any way out of the use of this driver software, even if advised
25 * of the possibility of such damage.
26 *
27 * This header file, and any modifications of this header file, are provided
28 * contingent upon your agreement and adherence to the here-listed terms and
29 * conditions.	By accepting and/or using this header file, you agree to abide
30 * by these terms and conditions and that these terms and conditions will be
31 * construed and governed in accordance with the laws of the State of California,
32 * without reference to conflict-of-law provisions.  If you do not agree
33 * to these terms and conditions, please delete this file, and any copies,
34 * permanently, without making any use thereof.
35 *
36 * THIS HEADER FILE IS PROVIDED FREE OF CHARGE ON AN AS-IS BASIS WITHOUT
37 * WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
38 * TO IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
39 * PURPOSE.  I2O SIG DOES NOT WARRANT THAT THIS HEADER FILE WILL MEET THE
40 * USER'S REQUIREMENTS OR THAT ITS OPERATION WILL BE UNINTERRUPTED OR
41 * ERROR-FREE.
42 *
43 * I2O SIG DISCLAIMS ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF
44 * ANY PROPRIETARY RIGHTS, RELATING TO THE IMPLEMENTATION OF THE I2O
45 * SPECIFICATIONS.  I2O SIG DOES NOT WARRANT OR REPRESENT THAT SUCH
46 * IMPLEMENTATIONS WILL NOT INFRINGE SUCH RIGHTS.
47 *
48 * THE USER OF THIS HEADER FILE SHALL HAVE NO RECOURSE TO I2O SIG FOR ANY
49 * ACTUAL OR CONSEQUENTIAL DAMAGES INCLUDING, BUT NOT LIMITED TO, LOST DATA
50 * OR LOST PROFITS ARISING OUT OF THE USE OR INABILITY TO USE THIS PROGRAM.
51 *
52 * I2O SIG grants the user of this header file a license to copy, distribute,
53 * and modify it, for any purpose, under the following terms.  Any copying,
54 * distribution, or modification of this header file must not delete or alter
55 * the copyright notice of I2O SIG or any of these Terms and Conditions.
56 *
57 * Any distribution of this header file must not include a charge for the
58 * header file (unless such charges are strictly for the physical acts of
59 * copying or transferring copies).  However, distribution of a product in
60 * which this header file is embedded may include a charge so long as any
61 * such charge does not include any charge for the header file itself.
62 *
63 * Any modification of this header file constitutes a derivative work based
64 * on this header file.	 Any distribution of such derivative work: (1) must
65 * include prominent notices that the header file has been changed from the
66 * original, together with the dates of any changes; (2) automatically includes
67 * this same license to the original header file from I2O SIG, without any
68 * restriction thereon from the distributing user; and (3) must include a
69 * grant of license of the modified file under the same terms and conditions
70 * as these Terms and Conditions.
71 *
72 * The I2O SIG Web site can be found at: http://www.i2osig.org
73 *
74 * The I2O SIG encourages you to deposit derivative works based on this
75 * header file at the I2O SIG Web site.	 Furthermore, to become a Registered
76 * Developer of the I2O SIG, sign up at the Web site or call 415.750.8352
77 * (United States).
78 *
79 * $FreeBSD: head/sys/dev/asr/i2otypes.h 96615 2002-05-14 21:59:10Z obrien $
80 *
81 ****************************************************************/
82
83#ifndef __INCi2otypesh
84#define	__INCi2otypesh
85
86#define	I2OTYPES_REV 1_5_4
87
88/* include architecture/compiler dependencies */
89
90#if ((defined(KERNEL) || defined(_KERNEL)) && defined(__FreeBSD__))
91# if (KERN_VERSION < 3)
92#  include "i386/pci/i2odep.h"
93# else
94#  include "dev/asr/i2odep.h"
95# endif
96#else
97# include "i2odep.h"
98#endif
99
100
101/* 64 bit defines */
102
103typedef struct _S64 {
104   U32			       LowPart;
105   S32			       HighPart;
106} S64;
107
108typedef struct _U64 {
109   U32			       LowPart;
110   U32			       HighPart;
111} U64;
112
113/* Pointer to Basics */
114
115typedef	   VOID		       *PVOID;
116typedef	   S8		       *PS8;
117typedef	   S16		       *PS16;
118typedef	   S32		       *PS32;
119typedef	   S64		       *PS64;
120
121/* Pointer to Unsigned Basics */
122
123typedef	   U8		       *PU8;
124typedef	   U16		       *PU16;
125typedef	   U32		       *PU32;
126typedef	   U64		       *PU64;
127
128/* misc */
129
130typedef S32		I2O_ARG;
131typedef U32		I2O_COUNT;
132typedef U32		I2O_USECS;
133typedef U32		I2O_ADDR32;
134typedef U32		I2O_SIZE;
135
136#endif /* __INCi2otypesh */
137