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