Staging: xgifb: Remove use of WINCE_HEADER define
[linux-2.6.git] / drivers / staging / xgifb / osdef.h
blob83fffe181ef99d627bf7494f74a7f538ecc1d58f
1 #ifndef _OSDEF_H_
2 #define _OSDEF_H_
4 /* #define TC */
5 #define LINUX_KERNEL
6 /* #define LINUX_XF86 */
8 /**********************************************************************/
9 #ifdef LINUX_KERNEL
10 //#include <linux/config.h>
11 #endif
14 /**********************************************************************/
15 #ifdef TC
16 #endif
17 #ifdef LINUX_XF86
18 #define LINUX
19 #endif
20 #ifdef LINUX_KERNEL
21 #define LINUX
22 #endif
24 /**********************************************************************/
25 #ifdef TC
26 #define XGI_SetMemory(MemoryAddress,MemorySize,value) memset(MemoryAddress, value, MemorySize);
27 #endif
28 #ifdef LINUX_XF86
29 #define XGI_SetMemory(MemoryAddress,MemorySize,value) memset(MemoryAddress, value, MemorySize)
30 #endif
31 #ifdef LINUX_KERNEL
32 #define XGI_SetMemory(MemoryAddress,MemorySize,value) memset(MemoryAddress, value, MemorySize)
33 #endif
34 /**********************************************************************/
36 /**********************************************************************/
38 #ifdef TC
39 #define XGI_MemoryCopy(Destination,Soruce,Length) memmove(Destination, Soruce, Length);
40 #endif
41 #ifdef LINUX_XF86
42 #define XGI_MemoryCopy(Destination,Soruce,Length) memcpy(Destination,Soruce,Length)
43 #endif
44 #ifdef LINUX_KERNEL
45 #define XGI_MemoryCopy(Destination,Soruce,Length) memcpy(Destination,Soruce,Length)
46 #endif
48 /**********************************************************************/
50 #ifdef OutPortByte
51 #undef OutPortByte
52 #endif /* OutPortByte */
54 #ifdef OutPortWord
55 #undef OutPortWord
56 #endif /* OutPortWord */
58 #ifdef OutPortLong
59 #undef OutPortLong
60 #endif /* OutPortLong */
62 #ifdef InPortByte
63 #undef InPortByte
64 #endif /* InPortByte */
66 #ifdef InPortWord
67 #undef InPortWord
68 #endif /* InPortWord */
70 #ifdef InPortLong
71 #undef InPortLong
72 #endif /* InPortLong */
74 /**********************************************************************/
75 /* TC */
76 /**********************************************************************/
78 #ifdef TC
79 #define OutPortByte(p,v) outp((unsigned short)(p),(unsigned char)(v))
80 #define OutPortWord(p,v) outp((unsigned short)(p),(unsigned short)(v))
81 #define OutPortLong(p,v) outp((unsigned short)(p),(unsigned long)(v))
82 #define InPortByte(p) inp((unsigned short)(p))
83 #define InPortWord(p) inp((unsigned short)(p))
84 #define InPortLong(p) ((inp((unsigned short)(p+2))<<16) | inp((unsigned short)(p)))
85 #endif
87 /**********************************************************************/
88 /* LINUX XF86 */
89 /**********************************************************************/
91 #ifdef LINUX_XF86
92 #define OutPortByte(p,v) outb((CARD16)(p),(CARD8)(v))
93 #define OutPortWord(p,v) outw((CARD16)(p),(CARD16)(v))
94 #define OutPortLong(p,v) outl((CARD16)(p),(CARD32)(v))
95 #define InPortByte(p) inb((CARD16)(p))
96 #define InPortWord(p) inw((CARD16)(p))
97 #define InPortLong(p) inl((CARD16)(p))
98 #endif
100 #ifdef LINUX_KERNEL
101 #define OutPortByte(p,v) outb((u8)(v),(p))
102 #define OutPortWord(p,v) outw((u16)(v),(p))
103 #define OutPortLong(p,v) outl((u32)(v),(p))
104 #define InPortByte(p) inb(p)
105 #define InPortWord(p) inw(p)
106 #define InPortLong(p) inl(p)
107 #endif
109 /**********************************************************************/
110 /* WIN 2000 */
111 /**********************************************************************/
115 /**********************************************************************/
116 /* WIN CE */
117 /**********************************************************************/
119 #endif // _OSDEF_H_