7 #include <linux/types.h>
9 void XGINew_SetReg1(unsigned long, unsigned short, unsigned short);
10 void XGINew_SetReg2(unsigned long, unsigned short, unsigned short);
11 void XGINew_SetReg3(unsigned long, unsigned short);
12 void XGINew_SetReg4(unsigned long, unsigned long);
13 unsigned char XGINew_GetReg1(unsigned long, unsigned short);
14 unsigned char XGINew_GetReg2(unsigned long);
15 unsigned long XGINew_GetReg3(unsigned long);
16 void XGINew_ClearDAC(unsigned char *);
17 void XGINew_SetRegANDOR(unsigned long Port, unsigned short Index,
18 unsigned short DataAND, unsigned short DataOR);
19 void XGINew_SetRegOR(unsigned long Port, unsigned short Index,
20 unsigned short DataOR);
21 void XGINew_SetRegAND(unsigned long Port, unsigned short Index,
22 unsigned short DataAND);
24 /* --------------------------------------------------------------------- */
25 /* Function : XGINew_SetReg1 */
28 /* Description : SR CRTC GR */
29 /* --------------------------------------------------------------------- */
30 void XGINew_SetReg1(unsigned long port, unsigned short index,
37 /* --------------------------------------------------------------------- */
38 /* Function : XGINew_SetReg2 */
41 /* Description : AR( 3C0 ) */
42 /* --------------------------------------------------------------------- */
44 void XGINew_SetReg2(unsigned long port, unsigned short index, unsigned short data)
46 InPortByte((P unsigned char)port + 0x3da - 0x3c0) ;
47 OutPortByte(XGINew_P3c0, index);
48 OutPortByte(XGINew_P3c0, data);
49 OutPortByte(XGINew_P3c0, 0x20);
53 void XGINew_SetReg3(unsigned long port, unsigned short data)
58 void XGINew_SetReg4(unsigned long port, unsigned long data)
63 unsigned char XGINew_GetReg1(unsigned long port, unsigned short index)
72 unsigned char XGINew_GetReg2(unsigned long port)
81 unsigned long XGINew_GetReg3(unsigned long port)
90 void XGINew_SetRegANDOR(unsigned long Port, unsigned short Index,
91 unsigned short DataAND, unsigned short DataOR)
95 temp = XGINew_GetReg1(Port, Index); /* XGINew_Part1Port index 02 */
96 temp = (temp & (DataAND)) | DataOR;
97 XGINew_SetReg1(Port, Index, temp);
100 void XGINew_SetRegAND(unsigned long Port, unsigned short Index,
101 unsigned short DataAND)
105 temp = XGINew_GetReg1(Port, Index); /* XGINew_Part1Port index 02 */
107 XGINew_SetReg1(Port, Index, temp);
110 void XGINew_SetRegOR(unsigned long Port, unsigned short Index,
111 unsigned short DataOR)
115 temp = XGINew_GetReg1(Port, Index); /* XGINew_Part1Port index 02 */
117 XGINew_SetReg1(Port, Index, temp);
121 void NewDelaySeconds(int seconds)
125 for (i = 0; i < seconds; i++) {
130 void Newdebugcode(unsigned char code)
132 /* OutPortByte(0x80, code); */
133 /* OutPortByte(0x300, code); */
134 /* NewDelaySeconds(0x3); */