Merge branch 'next-spi' of git://git.secretlab.ca/git/linux-2.6
[pandora-kernel.git] / drivers / staging / westbridge / astoria / include / linux / westbridge / cyastypes.h
1 /* Cypress West Bridge API header file (cyastypes.h)
2 ## ===========================
3 ## Copyright (C) 2010  Cypress Semiconductor
4 ##
5 ## This program is free software; you can redistribute it and/or
6 ## modify it under the terms of the GNU General Public License
7 ## as published by the Free Software Foundation; either version 2
8 ## of the License, or (at your option) any later version.
9 ##
10 ## This program is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 ## GNU General Public License for more details.
14 ##
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program; if not, write to the Free Software
17 ## Foundation, Inc., 51 Franklin Street
18 ## Fifth Floor, Boston, MA  02110-1301, USA.
19 ## ===========================
20 */
21
22 #ifndef _INCLUDED_CYASTYPES_H_
23 #define _INCLUDED_CYASTYPES_H_
24 /* moved to staging location, eventual implementation
25  * considered is here
26 #include <mach/westbridge/cyashaldef.h>
27 */
28  #include "../../../arch/arm/plat-omap/include/mach/westbridge/cyashaldef.h"
29
30 /* Types that are not available on specific platforms.
31  * These are used only in the reference HAL implementations and
32  * are not required for using the API.
33  */
34 #ifdef __unix__
35 typedef unsigned long DWORD;
36 typedef void *LPVOID;
37 #define WINAPI
38 #define INFINITE                (0xFFFFFFFF)
39 #define ptr_to_uint(ptr)  ((unsigned int)(ptr))
40 #endif
41
42 /* Basic types used by the entire API */
43
44 /* Summary
45    This type represents an endpoint number
46 */
47 typedef uint8_t cy_as_end_point_number_t;
48
49 /* Summary
50    This type is used to return status information from
51         an API call.
52 */
53 typedef uint16_t cy_as_return_status_t;
54
55 /* Summary
56    This type represents a bus number
57 */
58 typedef uint32_t cy_as_bus_number_t;
59
60 /* Summary
61    All APIs provided with this release are marked extern
62    through this definition. This definition can be changed
63    to meet the scope changes required in the user build
64    environment.
65
66    For example, this can be changed to __declspec(exportdll)
67    to enable exporting the API from a DLL.
68  */
69 #define EXTERN            extern
70
71 #endif