Linux-libre 4.14.82-gnu
[librecmc/linux-libre.git] / drivers / staging / media / atomisp / pci / atomisp2 / css2400 / hive_isp_css_include / type_support.h
1 /*
2  * Support for Intel Camera Imaging ISP subsystem.
3  * Copyright (c) 2015, Intel Corporation.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms and conditions of the GNU General Public License,
7  * version 2, as published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
12  * more details.
13  */
14
15 #ifndef __TYPE_SUPPORT_H_INCLUDED__
16 #define __TYPE_SUPPORT_H_INCLUDED__
17
18 /**
19 * @file
20 * Platform specific types.
21 *
22 * Per the DLI spec, types are in "type_support.h" and
23 * "platform_support.h" is for unclassified/to be refactored
24 * platform specific definitions.
25 */
26
27 #define IA_CSS_UINT8_T_BITS                                             8
28 #define IA_CSS_UINT16_T_BITS                                    16
29 #define IA_CSS_UINT32_T_BITS                                    32
30 #define IA_CSS_INT32_T_BITS                                             32
31 #define IA_CSS_UINT64_T_BITS                                    64
32
33 #if defined(_MSC_VER)
34 #include <stdint.h>
35 /* For ATE compilation define the bool */
36 #if defined(_ATE_)
37 #define bool int
38 #define true 1
39 #define false 0
40 #else
41 #include <stdbool.h>
42 #endif
43 #include <stddef.h>
44 #include <limits.h>
45 #include <errno.h>
46 #if defined(_M_X64)
47 #define HOST_ADDRESS(x) (unsigned long long)(x)
48 #else
49 #define HOST_ADDRESS(x) (unsigned long)(x)
50 #endif
51
52 #elif defined(__KERNEL__)
53
54 #define CHAR_BIT (8)
55
56 #include <linux/types.h>
57 #include <linux/limits.h>
58 #include <linux/errno.h>
59 #define HOST_ADDRESS(x) (unsigned long)(x)
60
61 #elif defined(__GNUC__)
62 #ifndef __STDC_LIMIT_MACROS
63 #define __STDC_LIMIT_MACROS 1
64 #endif
65 #include <stdint.h>
66 #include <stdbool.h>
67 #include <stddef.h>
68 #include <limits.h>
69 #include <errno.h>
70 #define HOST_ADDRESS(x) (unsigned long)(x)
71
72 #else /* default is for the FIST environment */
73 #include <stdint.h>
74 #include <stdbool.h>
75 #include <stddef.h>
76 #include <limits.h>
77 #include <errno.h>
78 #define HOST_ADDRESS(x) (unsigned long)(x)
79
80 #endif
81
82 #endif /* __TYPE_SUPPORT_H_INCLUDED__ */