9 #include <linux/types.h>
12 void XGINew_SetReg1( ULONG , USHORT , USHORT ) ;
13 void XGINew_SetReg2( ULONG , USHORT , USHORT ) ;
14 void XGINew_SetReg3( ULONG , USHORT ) ;
15 void XGINew_SetReg4( ULONG , ULONG ) ;
16 UCHAR XGINew_GetReg1( ULONG , USHORT) ;
17 UCHAR XGINew_GetReg2( ULONG ) ;
18 ULONG XGINew_GetReg3( ULONG ) ;
19 void XGINew_ClearDAC( PUCHAR ) ;
20 void XGINew_SetRegANDOR(ULONG Port,USHORT Index,USHORT DataAND,USHORT DataOR);
21 void XGINew_SetRegOR(ULONG Port,USHORT Index,USHORT DataOR);
22 void XGINew_SetRegAND(ULONG Port,USHORT Index,USHORT DataAND);
25 /* --------------------------------------------------------------------- */
26 /* Function : XGINew_SetReg1 */
29 /* Description : SR CRTC GR */
30 /* --------------------------------------------------------------------- */
31 void XGINew_SetReg1( ULONG port , USHORT index , USHORT data )
33 OutPortByte( port , index ) ;
34 OutPortByte( port + 1 , data ) ;
38 /* --------------------------------------------------------------------- */
39 /* Function : XGINew_SetReg2 */
42 /* Description : AR( 3C0 ) */
43 /* --------------------------------------------------------------------- */
44 /*void XGINew_SetReg2( ULONG port , USHORT index , USHORT data )
46 InPortByte( ( PUCHAR )port + 0x3da - 0x3c0 ) ;
47 OutPortByte( XGINew_P3c0 , index ) ;
48 OutPortByte( XGINew_P3c0 , data ) ;
49 OutPortByte( XGINew_P3c0 , 0x20 ) ;
53 /* --------------------------------------------------------------------- */
58 /* --------------------------------------------------------------------- */
59 void XGINew_SetReg3( ULONG port , USHORT data )
61 OutPortByte( port , data ) ;
65 /* --------------------------------------------------------------------- */
66 /* Function : XGINew_SetReg4 */
70 /* --------------------------------------------------------------------- */
71 void XGINew_SetReg4( ULONG port , ULONG data )
73 OutPortLong( port , data ) ;
77 /* --------------------------------------------------------------------- */
78 /* Function : XGINew_GetReg1 */
82 /* --------------------------------------------------------------------- */
83 UCHAR XGINew_GetReg1( ULONG port , USHORT index )
87 OutPortByte( port , index ) ;
88 data = InPortByte( port + 1 ) ;
94 /* --------------------------------------------------------------------- */
95 /* Function : XGINew_GetReg2 */
99 /* --------------------------------------------------------------------- */
100 UCHAR XGINew_GetReg2( ULONG port )
104 data = InPortByte( port ) ;
110 /* --------------------------------------------------------------------- */
111 /* Function : XGINew_GetReg3 */
115 /* --------------------------------------------------------------------- */
116 ULONG XGINew_GetReg3( ULONG port )
120 data = InPortLong( port ) ;
127 /* --------------------------------------------------------------------- */
128 /* Function : XGINew_SetRegANDOR */
132 /* --------------------------------------------------------------------- */
133 void XGINew_SetRegANDOR( ULONG Port , USHORT Index , USHORT DataAND , USHORT DataOR )
137 temp = XGINew_GetReg1( Port , Index ) ; /* XGINew_Part1Port index 02 */
138 temp = ( temp & ( DataAND ) ) | DataOR ;
139 XGINew_SetReg1( Port , Index , temp ) ;
143 /* --------------------------------------------------------------------- */
144 /* Function : XGINew_SetRegAND */
148 /* --------------------------------------------------------------------- */
149 void XGINew_SetRegAND(ULONG Port,USHORT Index,USHORT DataAND)
153 temp = XGINew_GetReg1( Port , Index ) ; /* XGINew_Part1Port index 02 */
155 XGINew_SetReg1( Port , Index , temp ) ;
159 /* --------------------------------------------------------------------- */
160 /* Function : XGINew_SetRegOR */
164 /* --------------------------------------------------------------------- */
165 void XGINew_SetRegOR( ULONG Port , USHORT Index , USHORT DataOR )
169 temp = XGINew_GetReg1( Port , Index ) ; /* XGINew_Part1Port index 02 */
171 XGINew_SetReg1( Port , Index , temp ) ;
175 /* --------------------------------------------------------------------- */
176 /* Function : NewDelaySecond */
180 /* --------------------------------------------------------------------- */
181 void NewDelaySeconds( int seconds )
186 for( i = 0 ; i < seconds ; i++ )
197 /* --------------------------------------------------------------------- */
198 /* Function : Newdebugcode */
202 /* --------------------------------------------------------------------- */
203 void Newdebugcode( UCHAR code )
205 // OutPortByte ( 0x80 , code ) ;
206 /* OutPortByte ( 0x300 , code ) ; */
207 /* NewDelaySeconds( 0x3 ) ; */