]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/staging/xgifb/vb_util.c
Staging: xgifb: Remove port macros in osdef.h
[mv-sheeva.git] / drivers / staging / xgifb / vb_util.c
index 87531b49b739d5ebd73339b26989f03021388fc3..f83aee7ea90e6301c2ebb51f8f24e1ca2910b24d 100644 (file)
@@ -1,42 +1,10 @@
-#include "osdef.h"
 #include "vb_def.h"
 #include "vgatypes.h"
 #include "vb_struct.h"
 
-#ifdef LINUX_KERNEL
 #include "XGIfb.h"
 #include <asm/io.h>
 #include <linux/types.h>
-#endif
-
-#ifdef TC
-#include <stdio.h>
-#include <string.h>
-#include <conio.h>
-#include <dos.h>
-#endif
-
-#ifdef WIN2000
-#include <dderror.h>
-#include <devioctl.h>
-#include <miniport.h>
-#include <ntddvdeo.h>
-#include <video.h>
-
-#include "xgiv.h"
-#include "dd_i2c.h"
-#include "tools.h"
-#endif
-
-#ifdef LINUX_XF86
-#include "xf86.h"
-#include "xf86PciInfo.h"
-#include "xgi.h"
-#include "xgi_regs.h"
-#endif
-
-
-
 
 void XGINew_SetReg1( ULONG , USHORT , USHORT ) ;
 void XGINew_SetReg2( ULONG , USHORT , USHORT ) ;
@@ -59,13 +27,8 @@ void     XGINew_SetRegAND(ULONG Port,USHORT Index,USHORT DataAND);
 /* --------------------------------------------------------------------- */
 void XGINew_SetReg1( ULONG port , USHORT index , USHORT data )
 {
-#ifdef LINUX_XF86
-    OutPortByte( ( PUCHAR )(ULONG)port , index ) ;
-    OutPortByte( ( PUCHAR )(ULONG)port + 1 , data ) ;
-#else
-    OutPortByte( port , index ) ;
-    OutPortByte( port + 1 , data ) ;
-#endif
+       outb(index, port);
+       outb(data, port + 1);
 }
 
 
@@ -92,7 +55,7 @@ void XGINew_SetReg1( ULONG port , USHORT index , USHORT data )
 /* --------------------------------------------------------------------- */
 void XGINew_SetReg3( ULONG port , USHORT data )
 {
-    OutPortByte( port , data ) ;
+       outb(data, port);
 }
 
 
@@ -104,7 +67,7 @@ void XGINew_SetReg3( ULONG port , USHORT data )
 /* --------------------------------------------------------------------- */
 void XGINew_SetReg4( ULONG port , ULONG data )
 {
-    OutPortLong( port , data ) ;
+       outl(data, port);
 }
 
 
@@ -118,14 +81,8 @@ UCHAR XGINew_GetReg1( ULONG port , USHORT index )
 {
     UCHAR data ;
 
-#ifdef LINUX_XF86
-    OutPortByte( ( PUCHAR )(ULONG)port , index ) ;
-    data = InPortByte( ( PUCHAR )(ULONG)port + 1 ) ;
-#else
-    OutPortByte( port , index ) ;
-    data = InPortByte( port + 1 ) ;
-#endif
-
+    outb(index, port);
+    data = inb(port + 1) ;
     return( data ) ;
 }
 
@@ -140,7 +97,7 @@ UCHAR XGINew_GetReg2( ULONG port )
 {
     UCHAR data ;
 
-    data = InPortByte( port ) ;
+    data = inb(port) ;
 
     return( data ) ;
 }
@@ -156,7 +113,7 @@ ULONG XGINew_GetReg3( ULONG port )
 {
     ULONG data ;
 
-    data = InPortLong( port ) ;
+    data = inl(port) ;
 
     return( data ) ;
 }
@@ -219,29 +176,14 @@ void XGINew_SetRegOR( ULONG Port , USHORT Index , USHORT DataOR )
 /* --------------------------------------------------------------------- */
 void NewDelaySeconds( int seconds )
 {
-#ifdef WIN2000
-    int j ;
-#endif
     int i ;
 
 
     for( i = 0 ; i < seconds ; i++ )
     {
-#ifdef TC
-        delay( 1000 ) ;
-#endif
-
-#ifdef WIN2000
 
-        for ( j = 0 ; j < 20000 ; j++ )
-            VideoPortStallExecution( 50 ) ;
-#endif
 
-#ifdef WINCE_HEADER
-#endif
 
-#ifdef LINUX_KERNEL
-#endif
     }
 }