asr(4): Sync with FreeBSD.
[dragonfly.git] / sys / dev / raid / asr / i2otypes.h
1 /*-
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  * $FreeBSD: src/sys/dev/asr/i2otypes.h,v 1.6 2005/01/06 01:42:29 imp Exp $
81  *
82  ****************************************************************/
83
84 #ifndef __INCi2otypesh
85 #define __INCi2otypesh
86
87 #define I2OTYPES_REV 1_5_4
88
89 /* include architecture/compiler dependencies */
90
91 #if ((defined(KERNEL) || defined(_KERNEL)) && defined(__FreeBSD__))
92 # if (KERN_VERSION < 3)
93 #  include "i386/pci/i2odep.h"
94 # else
95 #  include "dev/asr/i2odep.h"
96 # endif
97 #else
98 # include "i2odep.h"
99 #endif
100
101
102 /* 64 bit defines */
103
104 typedef struct _S64 {
105    U32                         LowPart;
106    S32                         HighPart;
107 } S64;
108
109 typedef struct _U64 {
110    U32                         LowPart;
111    U32                         HighPart;
112 } U64;
113
114 /* Pointer to Basics */
115
116 typedef    VOID                *PVOID;
117 typedef    S8                  *PS8;
118 typedef    S16                 *PS16;
119 typedef    S32                 *PS32;
120 typedef    S64                 *PS64;
121
122 /* Pointer to Unsigned Basics */
123
124 typedef    U8                  *PU8;
125 typedef    U16                 *PU16;
126 typedef    U32                 *PU32;
127 typedef    U64                 *PU64;
128
129 /* misc */
130
131 typedef S32             I2O_ARG;
132 typedef U32             I2O_COUNT;
133 typedef U32             I2O_USECS;
134 typedef U32             I2O_ADDR32;
135 typedef U32             I2O_SIZE;
136
137 #endif /* __INCi2otypesh */