packaging: update the changelog
[profile/ivi/intel-emgd-kmod.git] / pvr / include4 / img_types.h
1 /**********************************************************************
2  Copyright (c) Imagination Technologies Ltd.
3
4  Permission is hereby granted, free of charge, to any person obtaining a copy
5  of this software and associated documentation files (the "Software"), to deal
6  in the Software without restriction, including without limitation the rights
7  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8  copies of the Software, and to permit persons to whom the Software is
9  furnished to do so, subject to the following conditions:
10
11  The above copyright notice and this permission notice shall be included in
12  all copies or substantial portions of the Software.
13
14  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20  THE SOFTWARE.
21  ******************************************************************************/
22
23 #ifndef __IMG_TYPES_H__
24 #define __IMG_TYPES_H__
25
26 #if !defined(IMG_ADDRSPACE_CPUVADDR_BITS)
27 #define IMG_ADDRSPACE_CPUVADDR_BITS             32
28 #endif
29
30 #if !defined(IMG_ADDRSPACE_PHYSADDR_BITS)
31 #define IMG_ADDRSPACE_PHYSADDR_BITS             32
32 #endif
33
34 typedef unsigned int    IMG_UINT,       *IMG_PUINT;
35 typedef signed int              IMG_INT,        *IMG_PINT;
36
37 typedef unsigned char   IMG_UINT8,      *IMG_PUINT8;
38 typedef unsigned char   IMG_BYTE,       *IMG_PBYTE;
39 typedef signed char             IMG_INT8,       *IMG_PINT8;
40 typedef char                    IMG_CHAR,       *IMG_PCHAR;
41
42 typedef unsigned short  IMG_UINT16,     *IMG_PUINT16;
43 typedef signed short    IMG_INT16,      *IMG_PINT16;
44 typedef unsigned long   IMG_UINT32,     *IMG_PUINT32;
45 typedef signed long             IMG_INT32,      *IMG_PINT32;
46
47 #if !defined(IMG_UINT32_MAX)
48         #define IMG_UINT32_MAX 0xFFFFFFFFUL
49 #endif
50
51         #if (defined(LINUX) || defined(__METAG))
52 #if !defined(USE_CODE)
53                 typedef unsigned long long              IMG_UINT64,     *IMG_PUINT64;
54                 typedef long long                               IMG_INT64,      *IMG_PINT64;
55 #endif
56         #else
57
58                 #error("define an OS")
59
60         #endif
61
62 #if !(defined(LINUX) && defined (__KERNEL__))
63 typedef float                   IMG_FLOAT,      *IMG_PFLOAT;
64 typedef double                  IMG_DOUBLE, *IMG_PDOUBLE;
65 #endif
66
67 typedef enum tag_img_bool
68 {
69         IMG_FALSE               = 0,
70         IMG_TRUE                = 1,
71         IMG_FORCE_ALIGN = 0x7FFFFFFF
72 } IMG_BOOL, *IMG_PBOOL;
73
74 typedef void            IMG_VOID,       *IMG_PVOID;
75
76 typedef IMG_INT32       IMG_RESULT;
77
78 typedef IMG_UINT32      IMG_UINTPTR_T;
79
80 typedef IMG_PVOID       IMG_HANDLE;
81
82 typedef void**          IMG_HVOID,      * IMG_PHVOID;
83
84 typedef IMG_UINT32              IMG_SIZE_T;
85
86 #define IMG_NULL        0
87
88
89 typedef IMG_PVOID IMG_CPU_VIRTADDR;
90
91 typedef struct
92 {
93
94         IMG_UINT32 uiAddr;
95 #define IMG_CAST_TO_DEVVADDR_UINT(var)          (IMG_UINT32)(var)
96
97 } IMG_DEV_VIRTADDR;
98
99 typedef struct _IMG_CPU_PHYADDR
100 {
101
102         IMG_UINTPTR_T uiAddr;
103 } IMG_CPU_PHYADDR;
104
105 typedef struct _IMG_DEV_PHYADDR
106 {
107 #if IMG_ADDRSPACE_PHYSADDR_BITS == 32
108
109         IMG_UINTPTR_T uiAddr;
110 #else
111         IMG_UINT32 uiAddr;
112         IMG_UINT32 uiHighAddr;
113 #endif
114 } IMG_DEV_PHYADDR;
115
116 typedef struct _IMG_SYS_PHYADDR
117 {
118
119         IMG_UINTPTR_T uiAddr;
120 } IMG_SYS_PHYADDR;
121
122 #include "img_defs.h"
123
124 #endif