Skip to contentSkip to conversation

More xgifb cleanup

PATCH New Riccardo Magliocchetti 1 participant 7 messages Jun 5, 2010 Staging

lore
Share & tools
lore
#0 lore raw

cover More xgifb cleanup

Hello Arnaud,

a few more patches for cleaning up the xgifb driver, please apply.

Riccardo Magliocchetti (6):
More ifdefery cleanup.
kill osdef.h
Kill empty function NewDelaySeconds().
Kill unused header
Kill udelay wrapper
Use standard types instead of typedefs.

 drivers/staging/xgifb/XGI.h         |   10 -
 drivers/staging/xgifb/XGI_main.h    |   38 +-
 drivers/staging/xgifb/XGI_main_26.c |   34 +-
 drivers/staging/xgifb/osdef.h       |   34 --
 drivers/staging/xgifb/vb_ext.c      |  122 ++--
 drivers/staging/xgifb/vb_ext.h      |   12 +-
 drivers/staging/xgifb/vb_init.c     |  434 ++++++++--------
 drivers/staging/xgifb/vb_init.h     |    2 +-
 drivers/staging/xgifb/vb_setmode.c  | 1032 +++++++++++++++++-----------------
 drivers/staging/xgifb/vb_setmode.h  |   38 +-
 drivers/staging/xgifb/vb_struct.h   |  609 ++++++++++-----------
 drivers/staging/xgifb/vb_table.h    |  236 ++++----
 drivers/staging/xgifb/vb_util.c     |  105 ++---
 drivers/staging/xgifb/vb_util.h     |   21 +-
 drivers/staging/xgifb/vgatypes.h    |  122 +----
 15 files changed, 1351 insertions(+), 1498 deletions(-)
 delete mode 100644 drivers/staging/xgifb/XGI.h
 delete mode 100644 drivers/staging/xgifb/osdef.h
#1 lore raw

PATCH 1/6 More ifdefery cleanup.

---
 drivers/staging/xgifb/vb_struct.h |    9 ---------
 drivers/staging/xgifb/vgatypes.h  |   12 ------------
 2 files changed, 0 insertions(+), 21 deletions(-)
drivers/staging/xgifb/vb_struct.h +0 -9
index bb25c0e..1302d8f 100644
@@ -1,15 +1,6 @@
 #ifndef _VB_STRUCT_
 #define _VB_STRUCT_
 
-#ifdef _INITNEW_
-#define EXTERN
-#else
-#define EXTERN extern
-#endif
-
-
-
-
 typedef struct _XGI_PanelDelayTblStruct
 {
  UCHAR timer[2];
drivers/staging/xgifb/vgatypes.h +0 -12
index 7ca84fe..3df7a39 100644
@@ -74,7 +74,6 @@ typedef unsigned long XGIIOADDRESS;
 #define VBIOS_VER_MAX_LENGTH    4
 #endif
 
-#ifndef XGI_VB_CHIP_TYPE
 typedef enum _XGI_VB_CHIP_TYPE {
     VB_CHIP_Legacy = 0,
     VB_CHIP_301,
@@ -88,9 +87,7 @@ typedef enum _XGI_VB_CHIP_TYPE {
     VB_CHIP_UNKNOWN, /* other video bridge or no video bridge */
     MAX_VB_CHIP
 } XGI_VB_CHIP_TYPE;
-#endif
 
-#ifndef XGI_LCD_TYPE
 typedef enum _XGI_LCD_TYPE {
     LCD_INVALID = 0,
     LCD_320x480,       /* FSTN, DSTN */
@@ -116,17 +113,12 @@ typedef enum _XGI_LCD_TYPE {
     LCD_CUSTOM,
     LCD_UNKNOWN
 } XGI_LCD_TYPE;
-#endif
 
-#ifndef PXGI_DSReg
 typedef struct _XGI_DSReg
 {
   UCHAR  jIdx;
   UCHAR  jVal;
 } XGI_DSReg, *PXGI_DSReg;
-#endif
-
-#ifndef XGI_HW_DEVICE_INFO
 
 typedef struct _XGI_HW_DEVICE_INFO  XGI_HW_DEVICE_INFO, *PXGI_HW_DEVICE_INFO;
 
@@ -194,9 +186,6 @@ struct _XGI_HW_DEVICE_INFO
                                  /* end data :(idx, val) =  (FF, FF) */
                                  /* Note : restore cR registers if  */
                                  /* bSkipDramSizing = TRUE */
-/*
-#endif
-*/
 
     PXGI_QUERYSPACE  pQueryVGAConfigSpace;
 
@@ -205,7 +194,6 @@ struct _XGI_HW_DEVICE_INFO
     UCHAR  szVBIOSVer[VBIOS_VER_MAX_LENGTH];
 
 };
-#endif
 
 #endif
 
Signature · 1 line
1.7.1
#2 lore raw

PATCH 2/6 kill osdef.h

In reply to Riccardo Magliocchetti
---
 drivers/staging/xgifb/osdef.h   |   34 ----------------------------------
 drivers/staging/xgifb/vb_init.c |    5 ++---
 drivers/staging/xgifb/vb_util.c |   29 ++++++++++++++---------------
 3 files changed, 16 insertions(+), 52 deletions(-)
 delete mode 100644 drivers/staging/xgifb/osdef.h
drivers/staging/xgifb/osdef.h deleted +0 -34
deleted file mode 100644
index 5e4dec5..0000000
@@ -1,34 +0,0 @@
-#ifndef _OSDEF_H_
-#define _OSDEF_H_
-
-#ifdef OutPortByte
-#undef OutPortByte
-#endif /* OutPortByte */
-
-#ifdef OutPortWord
-#undef OutPortWord
-#endif /* OutPortWord */
-
-#ifdef OutPortLong
-#undef OutPortLong
-#endif /* OutPortLong */
-
-#ifdef InPortByte
-#undef InPortByte
-#endif /* InPortByte */
-
-#ifdef InPortWord
-#undef InPortWord
-#endif /* InPortWord */
-
-#ifdef InPortLong
-#undef InPortLong
-#endif /* InPortLong */
-
-#define OutPortByte(p,v) outb((u8)(v),(p))
-#define OutPortWord(p,v) outw((u16)(v),(p))
-#define OutPortLong(p,v) outl((u32)(v),(p))
-#define InPortByte(p)    inb(p)
-#define InPortWord(p)    inw(p)
-#define InPortLong(p)    inl(p)
-#endif // _OSDEF_H_
drivers/staging/xgifb/vb_init.c +2 -3
index 2481bd6..b1f3d35 100644
@@ -1,4 +1,3 @@
-#include "osdef.h"
 #include "vgatypes.h"
 
 
@@ -524,8 +523,8 @@ printk("22");
 */
 
 //    base = 0x80000000 ;
-//    OutPortLong( 0xcf8 , base ) ;
-//    Temp = ( InPortLong( 0xcfc ) & 0xFFFF ) ;
+//    outl( (u32)base , 0xcf8 ) ;
+//    Temp = ( inl( 0xcfc ) & 0xFFFF ) ;
 //    if ( Temp == 0x1039 )
 //    {
         XGINew_SetReg1( pVBInfo->P3c4 , 0x22 , ( UCHAR )( ( *pVBInfo->pSR22 ) & 0xFE ) ) ;
drivers/staging/xgifb/vb_util.c +14 -15
index 43c408e..39e55c9 100644
@@ -1,4 +1,3 @@
-#include "osdef.h"
 #include "vb_def.h"
 #include "vgatypes.h"
 #include "vb_struct.h"
@@ -28,8 +27,8 @@ void     XGINew_SetRegAND(ULONG Port,USHORT Index,USHORT DataAND);
 /* --------------------------------------------------------------------- */
 void XGINew_SetReg1( ULONG port , USHORT index , USHORT data )
 {
-    OutPortByte( port , index ) ;
-    OutPortByte( port + 1 , data ) ;
+    outb( (u8)index , port ) ;
+    outb( (u8)data , port + 1 ) ;
 }
 
 
@@ -41,10 +40,10 @@ void XGINew_SetReg1( ULONG port , USHORT index , USHORT data )
 /* --------------------------------------------------------------------- */
 /*void XGINew_SetReg2( ULONG port , USHORT index , USHORT data )
 {
-    InPortByte( ( PUCHAR )port + 0x3da - 0x3c0 ) ;
-    OutPortByte( XGINew_P3c0 , index ) ;
-    OutPortByte( XGINew_P3c0 , data ) ;
-    OutPortByte( XGINew_P3c0 , 0x20 ) ;
+    inb( ( PUCHAR )port + 0x3da - 0x3c0 ) ;
+    outb( (u8)index , XGINew_P3c0 ) ;
+    outb( (u8)data , XGINew_P3c0 ) ;
+    outb( (u8)0x20 , XGINew_P3c0 ) ;
 }*/
 
 
@@ -56,7 +55,7 @@ void XGINew_SetReg1( ULONG port , USHORT index , USHORT data )
 /* --------------------------------------------------------------------- */
 void XGINew_SetReg3( ULONG port , USHORT data )
 {
-    OutPortByte( port , data ) ;
+    outb( (u8)data , port ) ;
 }
 
 
@@ -68,7 +67,7 @@ void XGINew_SetReg3( ULONG port , USHORT data )
 /* --------------------------------------------------------------------- */
 void XGINew_SetReg4( ULONG port , ULONG data )
 {
-    OutPortLong( port , data ) ;
+    outl( (u32)data , port ) ;
 }
 
 
@@ -82,8 +81,8 @@ UCHAR XGINew_GetReg1( ULONG port , USHORT index )
 {
     UCHAR data ;
 
-    OutPortByte( port , index ) ;
-    data = InPortByte( port + 1 ) ;
+    outb( (u8)index , port ) ;
+    data = inb( port + 1 ) ;
 
     return( data ) ;
 }
@@ -99,7 +98,7 @@ UCHAR XGINew_GetReg2( ULONG port )
 {
     UCHAR data ;
 
-    data = InPortByte( port ) ;
+    data = inb( port ) ;
 
     return( data ) ;
 }
@@ -115,7 +114,7 @@ ULONG XGINew_GetReg3( ULONG port )
 {
     ULONG data ;
 
-    data = InPortLong( port ) ;
+    data = inl( port ) ;
 
     return( data ) ;
 }
@@ -195,8 +194,8 @@ void NewDelaySeconds( int seconds )
 /* --------------------------------------------------------------------- */
 void Newdebugcode( UCHAR code )
 {
-//    OutPortByte ( 0x80 , code ) ;
-    /* OutPortByte ( 0x300 , code ) ; */
+//    outb ( (u8)code , 0x80 ) ;
+    /* outb ( (u8)code , 0x300 ) ; */
     /* NewDelaySeconds( 0x3 ) ; */
 }
 
Signature · 1 line
1.7.1
#3 lore raw

PATCH 3/6 Kill empty function NewDelaySeconds().

In reply to Riccardo Magliocchetti
---
 drivers/staging/xgifb/vb_util.c |   20 --------------------
 drivers/staging/xgifb/vb_util.h |    1 -
 2 files changed, 0 insertions(+), 21 deletions(-)
drivers/staging/xgifb/vb_util.c +0 -20
index 39e55c9..3419341 100644
@@ -170,23 +170,6 @@ void XGINew_SetRegOR( ULONG Port , USHORT Index , USHORT DataOR )
 
 
 /* --------------------------------------------------------------------- */
-/* Function : NewDelaySecond */
-/* Input : */
-/* Output : */
-/* Description : */
-/* --------------------------------------------------------------------- */
-void NewDelaySeconds( int seconds )
-{
-    int i ;
-
-
-    for( i = 0 ; i < seconds ; i++ )
-    {
-    }
-}
-
-
-/* --------------------------------------------------------------------- */
 /* Function : Newdebugcode */
 /* Input : */
 /* Output : */
@@ -196,8 +179,5 @@ void Newdebugcode( UCHAR code )
 {
 //    outb ( (u8)code , 0x80 ) ;
     /* outb ( (u8)code , 0x300 ) ; */
-    /* NewDelaySeconds( 0x3 ) ; */
 }
 
-
-
drivers/staging/xgifb/vb_util.h +0 -1
index 91779d8..4abe3a9 100644
@@ -1,6 +1,5 @@
 #ifndef _VBUTIL_
 #define _VBUTIL_
-extern   void     NewDelaySeconds( int );
 extern   void     Newdebugcode( UCHAR );
 extern   void     XGINew_SetReg1(ULONG, USHORT, USHORT);
 extern   void     XGINew_SetReg3(ULONG, USHORT);
Signature · 1 line
1.7.1
#4 lore raw

PATCH 4/6 Kill unused header

In reply to Riccardo Magliocchetti
---
 drivers/staging/xgifb/XGI.h |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)
 delete mode 100644 drivers/staging/xgifb/XGI.h
drivers/staging/xgifb/XGI.h deleted +0 -10
deleted file mode 100644
index 87803dd..0000000
@@ -1,10 +0,0 @@
-#ifndef _XGI_H
-#define _XGI_H
-
-#if 1
-#define TWDEBUG(x)
-#else
-#define TWDEBUG(x) printk(KERN_INFO x "\n");
-#endif
-
-#endif
Signature · 1 line
1.7.1
#5 lore raw

PATCH 5/6 Kill udelay wrapper

In reply to Riccardo Magliocchetti
---
 drivers/staging/xgifb/vb_init.c |  119 +++++++++++++++++++--------------------
 1 files changed, 57 insertions(+), 62 deletions(-)
drivers/staging/xgifb/vb_init.c +57 -62
index b1f3d35..1b1ef8b 100644
@@ -109,11 +109,6 @@ UCHAR    GetXG21FPBits(PVB_DEVICE_INFO pVBInfo);
 void     XGINew_GetXG27Sense(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo) ;
 UCHAR    GetXG27FPBits(PVB_DEVICE_INFO pVBInfo);
 
-void DelayUS(ULONG MicroSeconds)
-{
-	udelay(MicroSeconds);
-}
-
 /* --------------------------------------------------------------------- */
 /* Function : XGIInitNew */
 /* Input : */
@@ -603,7 +598,7 @@ UCHAR XGINew_GetXG20DRAMType( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE
     else if ( HwDeviceExtension->jChipType == XG21 )
     {
         XGINew_SetRegAND( pVBInfo->P3d4 , 0xB4 , ~0x02 ) ;     		/* Independent GPIO control */
-     	DelayUS(800);
+     	udelay(800);
         XGINew_SetRegOR( pVBInfo->P3d4 , 0x4A , 0x80 ) ;		/* Enable GPIOH read */
         temp = XGINew_GetReg1( pVBInfo->P3d4 , 0x48 ) ;       		/* GPIOF 0:DVI 1:DVO */
 // HOTPLUG_SUPPORT
@@ -699,21 +694,21 @@ void XGINew_DDR1x_MRS_340( ULONG P3c4 , PVB_DEVICE_INFO pVBInfo)
 
     if ( *pVBInfo->pXGINew_DRAMTypeDefinition != 0x0C )	/* Samsung F Die */
     {
-        DelayUS( 3000 ) ;	/* Delay 67 x 3 Delay15us */
+        udelay( 3000 ) ;	/* Delay 67 x 3 Delay15us */
         XGINew_SetReg1( P3c4 , 0x18 , 0x00 ) ;
         XGINew_SetReg1( P3c4 , 0x19 , 0x20 ) ;
         XGINew_SetReg1( P3c4 , 0x16 , 0x00 ) ;
         XGINew_SetReg1( P3c4 , 0x16 , 0x80 ) ;
     }
 
-    DelayUS( 60 ) ;
+    udelay( 60 ) ;
     XGINew_SetReg1( P3c4 , 0x18 , pVBInfo->SR15[ 2 ][ XGINew_RAMType ] ) ;	/* SR18 */
     XGINew_SetReg1( P3c4 , 0x19 , 0x01 ) ;
     XGINew_SetReg1( P3c4 , 0x16 , pVBInfo->SR16[ 0 ] ) ;
     XGINew_SetReg1( P3c4 , 0x16 , pVBInfo->SR16[ 1 ] ) ;
-    DelayUS( 1000 ) ;
+    udelay( 1000 ) ;
     XGINew_SetReg1( P3c4 , 0x1B , 0x03 ) ;
-    DelayUS( 500 ) ;
+    udelay( 500 ) ;
     XGINew_SetReg1( P3c4 , 0x18 , pVBInfo->SR15[ 2 ][ XGINew_RAMType ] ) ;	/* SR18 */
     XGINew_SetReg1( P3c4 , 0x19 , 0x00 ) ;
     XGINew_SetReg1( P3c4 , 0x16 , pVBInfo->SR16[ 2 ] ) ;
@@ -734,15 +729,15 @@ void XGINew_DDR2x_MRS_340( ULONG P3c4 , PVB_DEVICE_INFO pVBInfo)
     XGINew_SetReg1( P3c4 , 0x19 , 0x20 ) ;
     XGINew_SetReg1( P3c4 , 0x16 , 0x00 ) ;
     XGINew_SetReg1( P3c4 , 0x16 , 0x80 ) ;
-    DelayUS( 60 ) ;
+    udelay( 60 ) ;
     XGINew_SetReg1( P3c4 , 0x18 , pVBInfo->SR15[ 2 ][ XGINew_RAMType ] ) ;	/* SR18 */
     /* XGINew_SetReg1( P3c4 , 0x18 , 0x31 ) ; */
     XGINew_SetReg1( P3c4 , 0x19 , 0x01 ) ;
     XGINew_SetReg1( P3c4 , 0x16 , 0x05 ) ;
     XGINew_SetReg1( P3c4 , 0x16 , 0x85 ) ;
-    DelayUS( 1000 ) ;
+    udelay( 1000 ) ;
     XGINew_SetReg1( P3c4 , 0x1B , 0x03 ) ;
-    DelayUS( 500 ) ;
+    udelay( 500 ) ;
     /* XGINew_SetReg1( P3c4 , 0x18 , 0x31 ) ; */
     XGINew_SetReg1( P3c4 , 0x18 , pVBInfo->SR15[ 2 ][ XGINew_RAMType ] ) ;	/* SR18 */
     XGINew_SetReg1( P3c4 , 0x19 , 0x00 ) ;
@@ -767,65 +762,65 @@ void XGINew_DDRII_Bootup_XG27( PXGI_HW_DEVICE_INFO HwDeviceExtension ,  ULONG P3
     /* XGINew_SetReg1( P3d4 , 0x97 , 0x11 ) ; */		/* CR97 */
     XGINew_SetReg1( P3d4 , 0x97 , *pVBInfo->pXGINew_CR97 ) ;    /* CR97 */
 
-    DelayUS( 200 ) ;
+    udelay( 200 ) ;
 
     XGINew_SetReg1( P3c4 , 0x18 , 0x00 ) ;   /* Set SR18 */ //EMRS2
     XGINew_SetReg1( P3c4 , 0x19 , 0x80 ) ;   /* Set SR19 */
     XGINew_SetReg1( P3c4 , 0x16 , 0x20 ) ;   /* Set SR16 */
-    DelayUS( 15 ) ;
+    udelay( 15 ) ;
     XGINew_SetReg1( P3c4 , 0x16 , 0xA0 ) ;   /* Set SR16 */
-    DelayUS( 15 ) ;
+    udelay( 15 ) ;
 
     XGINew_SetReg1( P3c4 , 0x18 , 0x00 ) ;   /* Set SR18 */ //EMRS3
     XGINew_SetReg1( P3c4 , 0x19 , 0xC0 ) ;   /* Set SR19 */
     XGINew_SetReg1( P3c4 , 0x16 , 0x20 ) ;   /* Set SR16 */
-    DelayUS( 15 ) ;
+    udelay( 15 ) ;
     XGINew_SetReg1( P3c4 , 0x16 , 0xA0 ) ;   /* Set SR16 */
-    DelayUS( 15) ;
+    udelay( 15) ;
 
     XGINew_SetReg1( P3c4 , 0x18 , 0x00 ) ;   /* Set SR18 */ //EMRS1
     XGINew_SetReg1( P3c4 , 0x19 , 0x40 ) ;   /* Set SR19 */
     XGINew_SetReg1( P3c4 , 0x16 , 0x20 ) ;   /* Set SR16 */
-    DelayUS( 30 ) ;
+    udelay( 30 ) ;
     XGINew_SetReg1( P3c4 , 0x16 , 0xA0 ) ;   /* Set SR16 */
-    DelayUS( 15 ) ;
+    udelay( 15 ) ;
 
     XGINew_SetReg1( P3c4 , 0x18 , 0x42 ) ;   /* Set SR18 */ //MRS, DLL Enable
     XGINew_SetReg1( P3c4 , 0x19 , 0x0A ) ;   /* Set SR19 */
     XGINew_SetReg1( P3c4 , 0x16 , 0x00 ) ;   /* Set SR16 */
-    DelayUS( 30 ) ;
+    udelay( 30 ) ;
     XGINew_SetReg1( P3c4 , 0x16 , 0x00 ) ;   /* Set SR16 */
     XGINew_SetReg1( P3c4 , 0x16 , 0x80 ) ;   /* Set SR16 */
-    /* DelayUS( 15 ) ; */
+    /* udelay( 15 ) ; */
 
     XGINew_SetReg1( P3c4 , 0x1B , 0x04 ) ;   /* Set SR1B */
-    DelayUS( 60 ) ;
+    udelay( 60 ) ;
     XGINew_SetReg1( P3c4 , 0x1B , 0x00 ) ;   /* Set SR1B */
 
     XGINew_SetReg1( P3c4 , 0x18 , 0x42 ) ;   /* Set SR18 */ //MRS, DLL Reset
     XGINew_SetReg1( P3c4 , 0x19 , 0x08 ) ;   /* Set SR19 */
     XGINew_SetReg1( P3c4 , 0x16 , 0x00 ) ;   /* Set SR16 */
 
-    DelayUS( 30 ) ;
+    udelay( 30 ) ;
     XGINew_SetReg1( P3c4 , 0x16 , 0x83 ) ;   /* Set SR16 */
-    DelayUS( 15 ) ;
+    udelay( 15 ) ;
 
     XGINew_SetReg1( P3c4 , 0x18 , 0x80 ) ;   /* Set SR18 */ //MRS, ODT
     XGINew_SetReg1( P3c4 , 0x19 , 0x46 ) ;   /* Set SR19 */
     XGINew_SetReg1( P3c4 , 0x16 , 0x20 ) ;   /* Set SR16 */
-    DelayUS( 30 ) ;
+    udelay( 30 ) ;
     XGINew_SetReg1( P3c4 , 0x16 , 0xA0 ) ;   /* Set SR16 */
-    DelayUS( 15 ) ;
+    udelay( 15 ) ;
 
     XGINew_SetReg1( P3c4 , 0x18 , 0x00 ) ;   /* Set SR18 */ //EMRS
     XGINew_SetReg1( P3c4 , 0x19 , 0x40 ) ;   /* Set SR19 */
     XGINew_SetReg1( P3c4 , 0x16 , 0x20 ) ;   /* Set SR16 */
-    DelayUS( 30 ) ;
+    udelay( 30 ) ;
     XGINew_SetReg1( P3c4 , 0x16 , 0xA0 ) ;   /* Set SR16 */
-    DelayUS( 15 ) ;
+    udelay( 15 ) ;
 
     XGINew_SetReg1( P3c4 , 0x1B , 0x04 ) ;   /* Set SR1B refresh control 000:close; 010:open */
-    DelayUS( 200 ) ;
+    udelay( 200 ) ;
 
 
 }
@@ -844,7 +839,7 @@ void XGINew_DDR2_MRS_XG20( PXGI_HW_DEVICE_INFO HwDeviceExtension ,  ULONG P3c4 ,
 
     XGINew_SetReg1( P3d4 , 0x97 , 0x11 ) ;			/* CR97 */
 
-    DelayUS( 200 ) ;
+    udelay( 200 ) ;
     XGINew_SetReg1( P3c4 , 0x18 , 0x00 ) ;			/* EMRS2 */
     XGINew_SetReg1( P3c4 , 0x19 , 0x80 ) ;
     XGINew_SetReg1( P3c4 , 0x16 , 0x05 ) ;
@@ -866,11 +861,11 @@ void XGINew_DDR2_MRS_XG20( PXGI_HW_DEVICE_INFO HwDeviceExtension ,  ULONG P3c4 ,
     XGINew_SetReg1( P3c4 , 0x16 , 0x05 ) ;
     XGINew_SetReg1( P3c4 , 0x16 , 0x85 ) ;
 
-    DelayUS( 15 ) ;
+    udelay( 15 ) ;
     XGINew_SetReg1( P3c4 , 0x1B , 0x04 ) ;			/* SR1B */
-    DelayUS( 30 ) ;
+    udelay( 30 ) ;
     XGINew_SetReg1( P3c4 , 0x1B , 0x00 ) ;			/* SR1B */
-    DelayUS( 100 ) ;
+    udelay( 100 ) ;
 
     //XGINew_SetReg1( P3c4 , 0x18 , 0x52 ) ;			/* MRS2 */
     XGINew_SetReg1( P3c4 , 0x18 , 0x42 ) ;			/* MRS1 */
@@ -878,7 +873,7 @@ void XGINew_DDR2_MRS_XG20( PXGI_HW_DEVICE_INFO HwDeviceExtension ,  ULONG P3c4 ,
     XGINew_SetReg1( P3c4 , 0x16 , 0x05 ) ;
     XGINew_SetReg1( P3c4 , 0x16 , 0x85 ) ;
 
-    DelayUS( 200 ) ;
+    udelay( 200 ) ;
 }
 
 /* --------------------------------------------------------------------- */
@@ -895,19 +890,19 @@ void XGINew_DDR2_MRS_XG27( PXGI_HW_DEVICE_INFO HwDeviceExtension ,  ULONG P3c4 ,
      XGINew_SetMemoryClock( HwDeviceExtension , pVBInfo ) ;
 
     XGINew_SetReg1( P3d4 , 0x97 , 0x11 ) ;			/* CR97 */
-    DelayUS( 200 ) ;
+    udelay( 200 ) ;
     XGINew_SetReg1( P3c4 , 0x18 , 0x00 ) ;			/* EMRS2 */
     XGINew_SetReg1( P3c4 , 0x19 , 0x80 ) ;
 
     XGINew_SetReg1( P3c4 , 0x16 , 0x10 ) ;
-    DelayUS( 15 ) ;                          ////06/11/23 XG27 A0 for CKE enable
+    udelay( 15 ) ;                          ////06/11/23 XG27 A0 for CKE enable
     XGINew_SetReg1( P3c4 , 0x16 , 0x90 ) ;
 
     XGINew_SetReg1( P3c4 , 0x18 , 0x00 ) ;			/* EMRS3 */
     XGINew_SetReg1( P3c4 , 0x19 , 0xC0 ) ;
 
     XGINew_SetReg1( P3c4 , 0x16 , 0x00 ) ;
-    DelayUS( 15 ) ;                          ////06/11/22 XG27 A0
+    udelay( 15 ) ;                          ////06/11/22 XG27 A0
     XGINew_SetReg1( P3c4 , 0x16 , 0x80 ) ;
 
 
@@ -915,19 +910,19 @@ void XGINew_DDR2_MRS_XG27( PXGI_HW_DEVICE_INFO HwDeviceExtension ,  ULONG P3c4 ,
     XGINew_SetReg1( P3c4 , 0x19 , 0x40 ) ;
 
     XGINew_SetReg1( P3c4 , 0x16 , 0x00 ) ;
-    DelayUS( 15 ) ;                          ////06/11/22 XG27 A0
+    udelay( 15 ) ;                          ////06/11/22 XG27 A0
     XGINew_SetReg1( P3c4 , 0x16 , 0x80 ) ;
 
     XGINew_SetReg1( P3c4 , 0x18 , 0x42 ) ;			/* MRS1 */
     XGINew_SetReg1( P3c4 , 0x19 , 0x06 ) ;   ////[Billy]06/11/22 DLL Reset for XG27 Hynix DRAM
 
     XGINew_SetReg1( P3c4 , 0x16 , 0x00 ) ;
-    DelayUS( 15 ) ;                          ////06/11/23 XG27 A0
+    udelay( 15 ) ;                          ////06/11/23 XG27 A0
     XGINew_SetReg1( P3c4 , 0x16 , 0x80 ) ;
 
-    DelayUS( 30 ) ;                          ////06/11/23 XG27 A0 Start Auto-PreCharge
+    udelay( 30 ) ;                          ////06/11/23 XG27 A0 Start Auto-PreCharge
     XGINew_SetReg1( P3c4 , 0x1B , 0x04 ) ;			/* SR1B */
-    DelayUS( 60 ) ;
+    udelay( 60 ) ;
     XGINew_SetReg1( P3c4 , 0x1B , 0x00 ) ;			/* SR1B */
 
 
@@ -935,26 +930,26 @@ void XGINew_DDR2_MRS_XG27( PXGI_HW_DEVICE_INFO HwDeviceExtension ,  ULONG P3c4 ,
     XGINew_SetReg1( P3c4 , 0x19 , 0x04 ) ;   //// DLL without Reset for XG27 Hynix DRAM
 
     XGINew_SetReg1( P3c4 , 0x16 , 0x00 ) ;
-    DelayUS( 30 ) ;
+    udelay( 30 ) ;
     XGINew_SetReg1( P3c4 , 0x16 , 0x80 ) ;
 
     XGINew_SetReg1( P3c4 , 0x18 , 0x80 );     ////XG27 OCD ON
     XGINew_SetReg1( P3c4 , 0x19 , 0x46 );
 
     XGINew_SetReg1( P3c4 , 0x16 , 0x00 ) ;
-    DelayUS( 30 ) ;
+    udelay( 30 ) ;
     XGINew_SetReg1( P3c4 , 0x16 , 0x80 ) ;
 
     XGINew_SetReg1( P3c4 , 0x18 , 0x00 );
     XGINew_SetReg1( P3c4 , 0x19 , 0x40 );
 
     XGINew_SetReg1( P3c4 , 0x16 , 0x00 ) ;
-    DelayUS( 30 ) ;
+    udelay( 30 ) ;
     XGINew_SetReg1( P3c4 , 0x16 , 0x80 ) ;
 
-    DelayUS( 15 ) ;                         ////Start Auto-PreCharge
+    udelay( 15 ) ;                         ////Start Auto-PreCharge
     XGINew_SetReg1( P3c4 , 0x1B , 0x04 ) ;			/* SR1B */
-    DelayUS( 200 ) ;
+    udelay( 200 ) ;
     XGINew_SetReg1( P3c4 , 0x1B , 0x03 ) ;			/* SR1B */
 
 }
@@ -1612,7 +1607,7 @@ void XGINew_SetDRAMSizingType( int index , USHORT DRAMTYPE_TABLE[][ 5 ] ,PVB_DEV
 
     data = DRAMTYPE_TABLE[ index ][ 4 ] ;
     XGINew_SetRegANDOR( pVBInfo->P3c4 , 0x13 , 0x80 , data ) ;
-    DelayUS( 15 ) ;
+    udelay( 15 ) ;
    /* should delay 50 ns */
 }
 
@@ -2129,7 +2124,7 @@ USHORT XGINew_SetDRAMSize20Reg( int index , USHORT DRAMTYPE_TABLE[][ 5 ], PVB_DE
 
         /* [2004/03/25] Vicent, Fix DRAM Sizing Error */
         XGINew_SetReg1( pVBInfo->P3c4 , 0x14 , ( XGINew_GetReg1( pVBInfo->P3c4 , 0x14 ) & 0x0F ) | ( data & 0xF0 ) ) ;
-	DelayUS( 15 ) ;
+	udelay( 15 ) ;
 
        /* data |= XGINew_ChannelAB << 2 ; */
        /* data |= ( XGINew_DataBusWidth / 64 ) << 1 ; */
@@ -2161,7 +2156,7 @@ int XGINew_ReadWriteRest( USHORT StopAddr , USHORT StartAddr, PVB_DEVICE_INFO pV
         *( ( PULONG )( pVBInfo->FBAddr + Position ) ) = Position ;
     }
 
-    DelayUS( 500 ) ;	/* [Vicent] 2004/04/16. Fix #1759 Memory Size error in Multi-Adapter. */
+    udelay( 500 ) ;	/* [Vicent] 2004/04/16. Fix #1759 Memory Size error in Multi-Adapter. */
 
     Position = 0 ;
 
@@ -2228,7 +2223,7 @@ void XGINew_CheckChannel( PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO
                 XGINew_DataBusWidth = 32 ;	/* 32 bits */
                 XGINew_SetReg1( pVBInfo->P3c4 , 0x13 , 0xB1 ) ;  /* 22bit + 2 rank + 32bit */
                 XGINew_SetReg1( pVBInfo->P3c4 , 0x14 , 0x52 ) ;
-		DelayUS( 15 ) ;
+		udelay( 15 ) ;
 
                 if ( XGINew_ReadWriteRest( 24 , 23 , pVBInfo ) == 1 )
                     return ;
@@ -2237,7 +2232,7 @@ void XGINew_CheckChannel( PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO
 		{
                   XGINew_SetReg1( pVBInfo->P3c4 , 0x13 , 0x31 ) ;  /* 22bit + 1 rank + 32bit */
                   XGINew_SetReg1( pVBInfo->P3c4 , 0x14 , 0x42 ) ;
-		  DelayUS( 15 ) ;
+		  udelay( 15 ) ;
 
                   if ( XGINew_ReadWriteRest( 23 , 23 , pVBInfo ) == 1 )
                       return ;
@@ -2249,13 +2244,13 @@ void XGINew_CheckChannel( PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO
 	        XGINew_DataBusWidth = 16 ;	/* 16 bits */
                 XGINew_SetReg1( pVBInfo->P3c4 , 0x13 , 0xB1 ) ;  /* 22bit + 2 rank + 16bit */
                 XGINew_SetReg1( pVBInfo->P3c4 , 0x14 , 0x41 ) ;
-		DelayUS( 15 ) ;
+		udelay( 15 ) ;
 
                 if ( XGINew_ReadWriteRest( 23 , 22 , pVBInfo ) == 1 )
                     return ;
                 else
                     XGINew_SetReg1( pVBInfo->P3c4 , 0x13 , 0x31 ) ;
-                    DelayUS( 15 ) ;
+                    udelay( 15 ) ;
               }
 
           }
@@ -2267,7 +2262,7 @@ void XGINew_CheckChannel( PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO
                 XGINew_DataBusWidth = 16 ;	/* 16 bits */
                 XGINew_SetReg1( pVBInfo->P3c4 , 0x13 , 0xB1 ) ;  /* (0x31:12x8x2) 22bit + 2 rank */
                 XGINew_SetReg1( pVBInfo->P3c4 , 0x14 , 0x41 ) ;  /* 0x41:16Mx16 bit*/
-                DelayUS( 15 ) ;
+                udelay( 15 ) ;
 
                 if ( XGINew_ReadWriteRest( 23 , 22 , pVBInfo ) == 1 )
                     return ;
@@ -2276,7 +2271,7 @@ void XGINew_CheckChannel( PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO
 		{
                   XGINew_SetReg1( pVBInfo->P3c4 , 0x13 , 0x31 ) ;  /* (0x31:12x8x2) 22bit + 1 rank */
                   XGINew_SetReg1( pVBInfo->P3c4 , 0x14 , 0x31 ) ;  /* 0x31:8Mx16 bit*/
-                  DelayUS( 15 ) ;
+                  udelay( 15 ) ;
 
                   if ( XGINew_ReadWriteRest( 22 , 22 , pVBInfo ) == 1 )
                       return ;
@@ -2289,13 +2284,13 @@ void XGINew_CheckChannel( PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO
 	        XGINew_DataBusWidth = 8 ;	/* 8 bits */
                 XGINew_SetReg1( pVBInfo->P3c4 , 0x13 , 0xB1 ) ;  /* (0x31:12x8x2) 22bit + 2 rank */
                 XGINew_SetReg1( pVBInfo->P3c4 , 0x14 , 0x30 ) ;  /* 0x30:8Mx8 bit*/
-                DelayUS( 15 ) ;
+                udelay( 15 ) ;
 
                 if ( XGINew_ReadWriteRest( 22 , 21 , pVBInfo ) == 1 )
                     return ;
                 else
                     XGINew_SetReg1( pVBInfo->P3c4 , 0x13 , 0x31 ) ;  /* (0x31:12x8x2) 22bit + 1 rank */
-                    DelayUS( 15 ) ;
+                    udelay( 15 ) ;
               }
           }
           break ;
@@ -2968,21 +2963,21 @@ void XGINew_DDR1x_MRS_XG20( ULONG P3c4 , PVB_DEVICE_INFO pVBInfo)
     XGINew_SetReg1( P3c4 , 0x19 , 0x40 ) ;
     XGINew_SetReg1( P3c4 , 0x16 , 0x00 ) ;
     XGINew_SetReg1( P3c4 , 0x16 , 0x80 ) ;
-    DelayUS( 60 ) ;
+    udelay( 60 ) ;
 
     XGINew_SetReg1( P3c4 , 0x18 , 0x00 ) ;
     XGINew_SetReg1( P3c4 , 0x19 , 0x40 ) ;
     XGINew_SetReg1( P3c4 , 0x16 , 0x00 ) ;
     XGINew_SetReg1( P3c4 , 0x16 , 0x80 ) ;
-    DelayUS( 60 ) ;
+    udelay( 60 ) ;
     XGINew_SetReg1( P3c4 , 0x18 , pVBInfo->SR15[ 2 ][ XGINew_RAMType ] ) ;	/* SR18 */
     /* XGINew_SetReg1( P3c4 , 0x18 , 0x31 ) ; */
     XGINew_SetReg1( P3c4 , 0x19 , 0x01 ) ;
     XGINew_SetReg1( P3c4 , 0x16 , 0x03 ) ;
     XGINew_SetReg1( P3c4 , 0x16 , 0x83 ) ;
-    DelayUS( 1000 ) ;
+    udelay( 1000 ) ;
     XGINew_SetReg1( P3c4 , 0x1B , 0x03 ) ;
-    DelayUS( 500 ) ;
+    udelay( 500 ) ;
     /* XGINew_SetReg1( P3c4 , 0x18 , 0x31 ) ; */
     XGINew_SetReg1( P3c4 , 0x18 , pVBInfo->SR15[ 2 ][ XGINew_RAMType ] ) ;	/* SR18 */
     XGINew_SetReg1( P3c4 , 0x19 , 0x00 ) ;
Signature · 1 line
1.7.1
#6 lore raw

PATCH 6/6 Use standard types instead of typedefs.

In reply to Riccardo Magliocchetti
---
 drivers/staging/xgifb/XGI_main.h    |   38 +-
 drivers/staging/xgifb/XGI_main_26.c |   34 +-
 drivers/staging/xgifb/vb_ext.c      |  122 ++--
 drivers/staging/xgifb/vb_ext.h      |   12 +-
 drivers/staging/xgifb/vb_init.c     |  310 ++++++------
 drivers/staging/xgifb/vb_init.h     |    2 +-
 drivers/staging/xgifb/vb_setmode.c  | 1032 +++++++++++++++++-----------------
 drivers/staging/xgifb/vb_setmode.h  |   38 +-
 drivers/staging/xgifb/vb_struct.h   |  600 ++++++++++----------
 drivers/staging/xgifb/vb_table.h    |  236 ++++----
 drivers/staging/xgifb/vb_util.c     |   58 +-
 drivers/staging/xgifb/vb_util.h     |   20 +-
 drivers/staging/xgifb/vgatypes.h    |  110 +---
 13 files changed, 1279 insertions(+), 1333 deletions(-)
drivers/staging/xgifb/XGI_main.h +19 -19
index c05bade..741b463 100644
@@ -500,13 +500,13 @@ u8  XGIfb_mode_no  = 0;
 u8  XGIfb_rate_idx = 0;
 
 /* TW: CR36 evaluation */
-const USHORT XGI300paneltype[] =
+const unsigned short XGI300paneltype[] =
     { LCD_UNKNOWN,   LCD_800x600,  LCD_1024x768,  LCD_1280x1024,
       LCD_1280x960,  LCD_640x480,  LCD_1024x600,  LCD_1152x768,
        LCD_1024x768, LCD_1024x768,  LCD_1024x768,
       LCD_1024x768,  LCD_1024x768, LCD_1024x768,  LCD_1024x768 };
 
-const USHORT XGI310paneltype[] =
+const unsigned short XGI310paneltype[] =
     { LCD_UNKNOWN,   LCD_800x600,  LCD_1024x768,  LCD_1280x1024,
       LCD_640x480,   LCD_1024x600, LCD_1152x864,  LCD_1280x960,
       LCD_1152x768,  LCD_1400x1050,LCD_1280x768,  LCD_1600x1200,
@@ -826,7 +826,7 @@ extern int      XGIfb_mode_rate_to_ddata(VB_DEVICE_INFO *XGI_Pr, PXGI_HW_DEVICE_
 			 unsigned int *sync, unsigned int *vmode);
 */
 
-			extern   BOOLEAN  XGI_SearchModeID( USHORT ModeNo,USHORT  *ModeIdIndex, PVB_DEVICE_INFO );
+			extern   bool  XGI_SearchModeID( unsigned short ModeNo,unsigned short  *ModeIdIndex, PVB_DEVICE_INFO );
 static int      XGIfb_get_fix(struct fb_fix_screeninfo *fix, int con,
 			      struct fb_info *info);
 
@@ -846,10 +846,10 @@ static int      XGIfb_do_set_var(struct fb_var_screeninfo *var, int isactive,
 static void     XGIfb_pre_setmode(void);
 static void     XGIfb_post_setmode(void);
 
-static BOOLEAN  XGIfb_CheckVBRetrace(void);
-static BOOLEAN  XGIfbcheckvretracecrt2(void);
-static BOOLEAN  XGIfbcheckvretracecrt1(void);
-static BOOLEAN  XGIfb_bridgeisslave(void);
+static bool  XGIfb_CheckVBRetrace(void);
+static bool  XGIfbcheckvretracecrt2(void);
+static bool  XGIfbcheckvretracecrt1(void);
+static bool  XGIfb_bridgeisslave(void);
 
 struct XGI_memreq {
 	unsigned long offset;
@@ -884,26 +884,26 @@ static XGI_OH   *XGIfb_poh_free(unsigned long base);
 static void     XGIfb_free_node(XGI_OH *poh);
 
 /* Internal routines to access PCI configuration space */
-BOOLEAN         XGIfb_query_VGA_config_space(PXGI_HW_DEVICE_INFO pXGIhw_ext,
+bool         XGIfb_query_VGA_config_space(PXGI_HW_DEVICE_INFO pXGIhw_ext,
 	          	unsigned long offset, unsigned long set, unsigned long *value);
-//BOOLEAN         XGIfb_query_north_bridge_space(PXGI_HW_DEVICE_INFO pXGIhw_ext,
+//bool         XGIfb_query_north_bridge_space(PXGI_HW_DEVICE_INFO pXGIhw_ext,
 //	         	unsigned long offset, unsigned long set, unsigned long *value);
 
 
 /* Routines from init.c/init301.c */
-extern void     InitTo330Pointer(UCHAR,PVB_DEVICE_INFO pVBInfo);
-extern BOOLEAN  XGIInitNew(PXGI_HW_DEVICE_INFO HwDeviceExtension);
-extern BOOLEAN  XGISetModeNew(PXGI_HW_DEVICE_INFO HwDeviceExtension, USHORT ModeNo);
+extern void     InitTo330Pointer(unsigned char,PVB_DEVICE_INFO pVBInfo);
+extern bool  XGIInitNew(PXGI_HW_DEVICE_INFO HwDeviceExtension);
+extern bool  XGISetModeNew(PXGI_HW_DEVICE_INFO HwDeviceExtension, unsigned short ModeNo);
 //extern void     XGI_SetEnableDstn(VB_DEVICE_INFO *XGI_Pr);
 extern void     XGI_LongWait(VB_DEVICE_INFO *XGI_Pr);
-extern USHORT   XGI_GetRatePtrCRT2( PXGI_HW_DEVICE_INFO pXGIHWDE, USHORT ModeNo,USHORT ModeIdIndex,PVB_DEVICE_INFO pVBInfo );
+extern unsigned short   XGI_GetRatePtrCRT2( PXGI_HW_DEVICE_INFO pXGIHWDE, unsigned short ModeNo,unsigned short ModeIdIndex,PVB_DEVICE_INFO pVBInfo );
 /* TW: Chrontel TV functions */
-extern USHORT 	XGI_GetCH700x(VB_DEVICE_INFO *XGI_Pr, USHORT tempbx);
-extern void 	XGI_SetCH700x(VB_DEVICE_INFO *XGI_Pr, USHORT tempbx);
-extern USHORT 	XGI_GetCH701x(VB_DEVICE_INFO *XGI_Pr, USHORT tempbx);
-extern void 	XGI_SetCH701x(VB_DEVICE_INFO *XGI_Pr, USHORT tempbx);
-extern void     XGI_SetCH70xxANDOR(VB_DEVICE_INFO *XGI_Pr, USHORT tempax,USHORT tempbh);
-extern void     XGI_DDC2Delay(VB_DEVICE_INFO *XGI_Pr, USHORT delaytime);
+extern unsigned short 	XGI_GetCH700x(VB_DEVICE_INFO *XGI_Pr, unsigned short tempbx);
+extern void 	XGI_SetCH700x(VB_DEVICE_INFO *XGI_Pr, unsigned short tempbx);
+extern unsigned short 	XGI_GetCH701x(VB_DEVICE_INFO *XGI_Pr, unsigned short tempbx);
+extern void 	XGI_SetCH701x(VB_DEVICE_INFO *XGI_Pr, unsigned short tempbx);
+extern void     XGI_SetCH70xxANDOR(VB_DEVICE_INFO *XGI_Pr, unsigned short tempax,unsigned short tempbh);
+extern void     XGI_DDC2Delay(VB_DEVICE_INFO *XGI_Pr, unsigned short delaytime);
 
 /* TW: Sensing routines */
 void            XGI_Sense30x(void);
drivers/staging/xgifb/XGI_main_26.c +17 -17
index 05e4603..96bbb2e 100644
@@ -165,11 +165,11 @@ int
 XGIfb_mode_rate_to_dclock(VB_DEVICE_INFO *XGI_Pr, PXGI_HW_DEVICE_INFO HwDeviceExtension,
 			  unsigned char modeno, unsigned char rateindex)
 {
-    USHORT ModeNo = modeno;
-    USHORT ModeIdIndex = 0, ClockIndex = 0;
-    USHORT RefreshRateTableIndex = 0;
+    unsigned short ModeNo = modeno;
+    unsigned short ModeIdIndex = 0, ClockIndex = 0;
+    unsigned short RefreshRateTableIndex = 0;
 
-    /*ULONG  temp = 0;*/
+    /*unsigned long  temp = 0;*/
     int    Clock;
     XGI_Pr->ROMAddr  = HwDeviceExtension->pjVirtualRomBase;
     InitTo330Pointer( HwDeviceExtension->jChipType, XGI_Pr ) ;
@@ -204,9 +204,9 @@ XGIfb_mode_rate_to_ddata(VB_DEVICE_INFO *XGI_Pr, PXGI_HW_DEVICE_INFO HwDeviceExt
 			 u32 *hsync_len, u32 *vsync_len,
 			 u32 *sync, u32 *vmode)
 {
-    USHORT ModeNo = modeno;
-    USHORT ModeIdIndex = 0, index = 0;
-    USHORT RefreshRateTableIndex = 0;
+    unsigned short ModeNo = modeno;
+    unsigned short ModeIdIndex = 0, index = 0;
+    unsigned short RefreshRateTableIndex = 0;
 
     unsigned short VRE, VBE, VRS, VBS, VDE, VT;
     unsigned short HRE, HBE, HRS, HBS, HDE, HT;
@@ -388,7 +388,7 @@ XGIfb_mode_rate_to_ddata(VB_DEVICE_INFO *XGI_Pr, PXGI_HW_DEVICE_INFO HwDeviceExt
 
 
 
-void XGIRegInit(VB_DEVICE_INFO *XGI_Pr, ULONG BaseAddr)
+void XGIRegInit(VB_DEVICE_INFO *XGI_Pr, unsigned long BaseAddr)
 {
    XGI_Pr->RelIO = BaseAddr;
    XGI_Pr->P3c4 = BaseAddr + 0x14;
@@ -426,7 +426,7 @@ u32 XGIfb_get_reg3(u16 port)
 
 /* ------------ Interface for init & mode switching code ------------- */
 
-BOOLEAN
+bool
 XGIfb_query_VGA_config_space(PXGI_HW_DEVICE_INFO pXGIhw_ext,
 	unsigned long offset, unsigned long set, unsigned long *value)
 {
@@ -461,7 +461,7 @@ XGIfb_query_VGA_config_space(PXGI_HW_DEVICE_INFO pXGIhw_ext,
 	return TRUE;
 }
 
-/*BOOLEAN XGIfb_query_north_bridge_space(PXGI_HW_DEVICE_INFO pXGIhw_ext,
+/*bool XGIfb_query_north_bridge_space(PXGI_HW_DEVICE_INFO pXGIhw_ext,
 	unsigned long offset, unsigned long set, unsigned long *value)
 {
 	static struct pci_dev *pdev = NULL;
@@ -952,7 +952,7 @@ static void XGIfb_search_tvstd(const char *name)
 }
 #endif
 
-static BOOLEAN XGIfb_bridgeisslave(void)
+static bool XGIfb_bridgeisslave(void)
 {
    unsigned char usScratchP1_00;
 
@@ -966,7 +966,7 @@ static BOOLEAN XGIfb_bridgeisslave(void)
    }
 }
 
-static BOOLEAN XGIfbcheckvretracecrt1(void)
+static bool XGIfbcheckvretracecrt1(void)
 {
    unsigned char temp;
 
@@ -982,7 +982,7 @@ static BOOLEAN XGIfbcheckvretracecrt1(void)
    else 			   return FALSE;
 }
 
-static BOOLEAN XGIfbcheckvretracecrt2(void)
+static bool XGIfbcheckvretracecrt2(void)
 {
    unsigned char temp;
    if(xgi_video_info.hasVB == HASVB_NONE) return FALSE;
@@ -991,7 +991,7 @@ static BOOLEAN XGIfbcheckvretracecrt2(void)
    else 	   return TRUE;
 }
 
-static BOOLEAN XGIfb_CheckVBRetrace(void)
+static bool XGIfb_CheckVBRetrace(void)
 {
    if(xgi_video_info.disp_state & DISPTYPE_DISP2) {
       if(XGIfb_bridgeisslave()) {
@@ -2648,7 +2648,7 @@ static void XGIfb_pre_setmode(void)
 static void XGIfb_post_setmode(void)
 {
 	u8 reg;
-	BOOLEAN doit = TRUE;
+	bool doit = TRUE;
 #if 0	/* TW: Wrong: Is not in MMIO space, but in RAM */
 	/* Backup mode number to MMIO space */
 	if(xgi_video_info.mmio_vbase) {
@@ -2966,14 +2966,14 @@ int __devinit xgifb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	  xgi_video_info.mmio_base = pci_resource_start(pdev, 1);
 	  XGIfb_mmio_size =  pci_resource_len(pdev, 1);
 	  xgi_video_info.vga_base = pci_resource_start(pdev, 2) + 0x30;
-	  XGIhw_ext.pjIOAddress = (PUCHAR)xgi_video_info.vga_base;
+	  XGIhw_ext.pjIOAddress = (unsigned char *)xgi_video_info.vga_base;
 	  //XGI_Pr.RelIO  = ioremap(pci_resource_start(pdev, 2), 128) + 0x30;
 	  printk("XGIfb: Relocate IO address: %lx [%08lx] \n", (unsigned long)pci_resource_start(pdev, 2), XGI_Pr.RelIO);
 
 	  if (pci_enable_device(pdev))
 	          return -EIO;
 
-    XGIRegInit(&XGI_Pr, (ULONG)XGIhw_ext.pjIOAddress);
+    XGIRegInit(&XGI_Pr, (unsigned long)XGIhw_ext.pjIOAddress);
 
     outXGIIDXREG(XGISR, IND_XGI_PASSWORD, XGI_PASSWORD);
     inXGIIDXREG(XGISR, IND_XGI_PASSWORD, reg1);
drivers/staging/xgifb/vb_ext.c +61 -61

293 lines not on this page · raw message

drivers/staging/xgifb/vb_ext.h +6 -6
index 3a52a6a..d775f8b 100644
@@ -2,15 +2,15 @@
 #define  _VBEXT_
 
 struct DWORDREGS {
-    ULONG    Eax, Ebx, Ecx, Edx, Esi, Edi, Ebp;
+    unsigned long    Eax, Ebx, Ecx, Edx, Esi, Edi, Ebp;
 };
 
 struct WORDREGS {
-    USHORT    ax, hi_ax, bx, hi_bx, cx, hi_cx, dx, hi_dx, si, hi_si, di ,hi_di, bp, hi_bp;
+    unsigned short    ax, hi_ax, bx, hi_bx, cx, hi_cx, dx, hi_dx, si, hi_si, di ,hi_di, bp, hi_bp;
 };
 
 struct BYTEREGS {
-    UCHAR   al, ah, hi_al, hi_ah, bl, bh, hi_bl, hi_bh, cl, ch, hi_cl, hi_ch, dl, dh, hi_dl, hi_dh;
+    unsigned char   al, ah, hi_al, hi_ah, bl, bh, hi_bl, hi_bh, cl, ch, hi_cl, hi_ch, dl, dh, hi_dl, hi_dh;
 };
 
 typedef union   _X86_REGS    {
@@ -20,10 +20,10 @@ typedef union   _X86_REGS    {
 } X86_REGS, *PX86_REGS;
 
 extern   void     XGI_XG21Fun14( PXGI_HW_DEVICE_INFO pXGIHWDE, PX86_REGS pBiosArguments);
-extern   void     XGISetDPMS( PXGI_HW_DEVICE_INFO pXGIHWDE , ULONG VESA_POWER_STATE ) ;
+extern   void     XGISetDPMS( PXGI_HW_DEVICE_INFO pXGIHWDE , unsigned long VESA_POWER_STATE ) ;
 extern   void     XGI_GetSenseStatus( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo );
 extern   void     XGINew_SetModeScratch ( PXGI_HW_DEVICE_INFO HwDeviceExtension , PVB_DEVICE_INFO pVBInfo ) ;
-extern   void 	  ReadVBIOSTablData( UCHAR ChipType , PVB_DEVICE_INFO pVBInfo);
-extern   USHORT   XGINew_SenseLCD(PXGI_HW_DEVICE_INFO,PVB_DEVICE_INFO pVBInfo);
+extern   void 	  ReadVBIOSTablData( unsigned char ChipType , PVB_DEVICE_INFO pVBInfo);
+extern   unsigned short   XGINew_SenseLCD(PXGI_HW_DEVICE_INFO,PVB_DEVICE_INFO pVBInfo);
 
 #endif
drivers/staging/xgifb/vb_init.c +155 -155

890 lines not on this page · raw message

drivers/staging/xgifb/vb_init.h +1 -1
index 1f39d9c..1eee154 100644
@@ -1,6 +1,6 @@
 #ifndef  _VBINIT_
 #define  _VBINIT_
-extern   BOOLEAN    XGIInitNew( PXGI_HW_DEVICE_INFO HwDeviceExtension ) ;
+extern   bool    XGIInitNew( PXGI_HW_DEVICE_INFO HwDeviceExtension ) ;
 extern XGI21_LVDSCapStruct  XGI21_LCDCapList[13];
 
 #endif
drivers/staging/xgifb/vb_setmode.c +516 -516

1,597 lines not on this page · raw message

drivers/staging/xgifb/vb_setmode.h +19 -19
index 09753d7..008cd9f 100644

Lines of this file are not shown. View the raw message.

drivers/staging/xgifb/vb_struct.h +300 -300

600 lines not on this page · raw message

drivers/staging/xgifb/vb_table.h +118 -118

236 lines not on this page · raw message

drivers/staging/xgifb/vb_util.c +29 -29

58 lines not on this page · raw message

drivers/staging/xgifb/vb_util.h +10 -10
index 4abe3a9..81e0c64 100644

Lines of this file are not shown. View the raw message.

drivers/staging/xgifb/vgatypes.h +28 -82

110 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.7.1

Part of the diff is not shown here. View the raw message.