Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc3678a6 authored by Bill Pemberton's avatar Bill Pemberton Committed by Greg Kroah-Hartman
Browse files

Staging: xgifb: Remove PUSHORT, PLONGU, and PVOID typedefs



Signed-off-by: default avatarBill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 274afb73
Loading
Loading
Loading
Loading
+36 −36
Original line number Diff line number Diff line
@@ -1619,9 +1619,9 @@ void XGINew_SetDRAMSizingType( int index , USHORT DRAMTYPE_TABLE[][ 5 ] ,PVB_DEV
void XGINew_CheckBusWidth_310(  PVB_DEVICE_INFO pVBInfo)
{
    USHORT data ;
    PULONG volatile pVideoMemory ;
    volatile unsigned long *pVideoMemory ;

    pVideoMemory = (PULONG) pVBInfo->FBAddr;
    pVideoMemory = (unsigned long *) pVBInfo->FBAddr;

    if ( XGINew_Get310DRAMType( pVBInfo ) < 2 )
    {
@@ -1832,7 +1832,7 @@ int XGINew_CheckColumn( int index , USHORT DRAMTYPE_TABLE[][ 5 ], PVB_DEVICE_INF

    for( i = 0 , Position = 0 ; i < 2 ; i++ )
    {
        *( ( PULONG )( pVBInfo->FBAddr + Position ) ) = Position ;
	    *((unsigned long *)(pVBInfo->FBAddr + Position)) = Position;
	    Position += Increment ;
    }

@@ -1840,8 +1840,8 @@ int XGINew_CheckColumn( int index , USHORT DRAMTYPE_TABLE[][ 5 ], PVB_DEVICE_INF
    for( i = 0 , Position = 0 ; i < 2 ; i++ )
    {
        /* if ( pVBInfo->FBAddr[ Position ] != Position ) */
        if ( ( *( PULONG )( pVBInfo->FBAddr + Position ) ) != Position )
            return( 0 ) ;
	    if ((*(unsigned long *)(pVBInfo->FBAddr + Position)) != Position)
		    return 0;
	    Position += Increment;
    }
    return( 1 ) ;
@@ -1864,15 +1864,15 @@ int XGINew_CheckBanks( int index , USHORT DRAMTYPE_TABLE[][ 5 ], PVB_DEVICE_INFO
    for( i = 0 , Position = 0 ; i < 4 ; i++ )
    {
        /* pVBInfo->FBAddr[ Position ] = Position ; */
        *( ( PULONG )( pVBInfo->FBAddr + Position ) ) = Position ;
	    *((unsigned long *)(pVBInfo->FBAddr + Position)) = Position;
	    Position += Increment ;
    }

    for( i = 0 , Position = 0 ; i < 4 ; i++ )
    {
        /* if (pVBInfo->FBAddr[ Position ] != Position ) */
        if ( ( *( PULONG )( pVBInfo->FBAddr + Position ) ) != Position )
            return( 0 ) ;
	    if ((*(unsigned long *)(pVBInfo->FBAddr + Position)) != Position)
		    return 0;
	    Position += Increment;
    }
    return( 1 ) ;
@@ -1896,17 +1896,17 @@ int XGINew_CheckRank( int RankNo , int index , USHORT DRAMTYPE_TABLE[][ 5 ], PVB
    for( i = 0 , Position = 0 ; i < 2 ; i++ )
    {
        /* pVBInfo->FBAddr[ Position ] = Position ; */
        /* *( ( PULONG )( pVBInfo->FBAddr ) ) = Position ; */
        *( ( PULONG )( pVBInfo->FBAddr + Position ) ) = Position ;
        /* *( (unsigned long *)( pVBInfo->FBAddr ) ) = Position ; */
	    *((unsigned long *)(pVBInfo->FBAddr + Position)) = Position;
	    Position += Increment;
    }

    for( i = 0 , Position = 0 ; i < 2 ; i++ )
    {
        /* if ( pVBInfo->FBAddr[ Position ] != Position ) */
        /* if ( ( *( PULONG )( pVBInfo->FBAddr ) ) != Position ) */
        if ( ( *( PULONG )( pVBInfo->FBAddr + Position ) ) != Position )
            return( 0 ) ;
        /* if ( ( *(unsigned long *)( pVBInfo->FBAddr ) ) != Position ) */
	    if ((*(unsigned long *)(pVBInfo->FBAddr + Position)) != Position)
		    return 0;
	    Position += Increment;
    }
    return( 1 );
@@ -1930,18 +1930,18 @@ int XGINew_CheckDDRRank( int RankNo , int index , USHORT DRAMTYPE_TABLE[][ 5 ],
    Increment += Increment / 2 ;

    Position = 0;
    *( ( PULONG )( pVBInfo->FBAddr + Position + 0 ) ) = 0x01234567 ;
    *( ( PULONG )( pVBInfo->FBAddr + Position + 1 ) ) = 0x456789AB ;
    *( ( PULONG )( pVBInfo->FBAddr + Position + 2 ) ) = 0x55555555 ;
    *( ( PULONG )( pVBInfo->FBAddr + Position + 3 ) ) = 0x55555555 ;
    *( ( PULONG )( pVBInfo->FBAddr + Position + 4 ) ) = 0xAAAAAAAA ;
    *( ( PULONG )( pVBInfo->FBAddr + Position + 5 ) ) = 0xAAAAAAAA ;

    if ( ( *( PULONG )( pVBInfo->FBAddr + 1 ) ) == 0x456789AB )
        return( 1 ) ;
    *((unsigned long *)(pVBInfo->FBAddr + Position + 0)) = 0x01234567;
    *((unsigned long *)(pVBInfo->FBAddr + Position + 1)) = 0x456789AB;
    *((unsigned long *)(pVBInfo->FBAddr + Position + 2)) = 0x55555555;
    *((unsigned long *)(pVBInfo->FBAddr + Position + 3)) = 0x55555555;
    *((unsigned long *)(pVBInfo->FBAddr + Position + 4)) = 0xAAAAAAAA;
    *((unsigned long *)(pVBInfo->FBAddr + Position + 5)) = 0xAAAAAAAA;

    if ((*(unsigned long *)(pVBInfo->FBAddr + 1)) == 0x456789AB)
	    return 1;

    if ( ( *( PULONG )( pVBInfo->FBAddr + 0 ) ) == 0x01234567 )
        return( 0 ) ;
    if ((*(unsigned long *)(pVBInfo->FBAddr + 0)) == 0x01234567)
	    return 0;

    data = XGINew_GetReg1( pVBInfo->P3c4 , 0x14 ) ;
    data &= 0xF3 ;
@@ -2147,26 +2147,26 @@ int XGINew_ReadWriteRest( USHORT StopAddr , USHORT StartAddr, PVB_DEVICE_INFO pV
    int i ;
    ULONG Position = 0 ;

   *( ( PULONG )( pVBInfo->FBAddr + Position ) ) = Position ;
    *((unsigned long *)(pVBInfo->FBAddr + Position)) = Position;

    for( i = StartAddr ; i <= StopAddr ; i++ )
    {
        Position = 1 << i ;
        *( ( PULONG )( pVBInfo->FBAddr + Position ) ) = Position ;
	*((unsigned long *)(pVBInfo->FBAddr + Position)) = Position;
    }

    DelayUS( 500 ) ;	/* [Vicent] 2004/04/16. Fix #1759 Memory Size error in Multi-Adapter. */

    Position = 0 ;

   if ( ( *( PULONG )( pVBInfo->FBAddr + Position ) ) != Position )
        return( 0 ) ;
   if ((*(unsigned long *)(pVBInfo->FBAddr + Position)) != Position)
	   return 0;

    for( i = StartAddr ; i <= StopAddr ; i++ )
    {
        Position = 1 << i ;
        if ( ( *( PULONG )( pVBInfo->FBAddr + Position ) ) != Position )
            return( 0 ) ;
	if ((*(unsigned long *)(pVBInfo->FBAddr + Position)) != Position)
		return 0;
    }
    return( 1 ) ;
}
+2 −2
Original line number Diff line number Diff line
@@ -2588,9 +2588,9 @@ void XGI_WriteDAC( USHORT dl , USHORT ah , USHORT al , USHORT dh,PVB_DEVICE_INFO
/* --------------------------------------------------------------------- */
void XGI_ClearBuffer( PXGI_HW_DEVICE_INFO HwDeviceExtension , USHORT ModeNo, PVB_DEVICE_INFO  pVBInfo)
{
    PVOID VideoMemoryAddress = ( PVOID )HwDeviceExtension->pjVideoMemoryAddress ;
    void *VideoMemoryAddress = (void *)HwDeviceExtension->pjVideoMemoryAddress;
    ULONG AdapterMemorySize  = ( ULONG )HwDeviceExtension->ulVideoMemorySize ;
    PUSHORT pBuffer ;
    unsigned short *pBuffer ;
    int i ;

    if ( pVBInfo->ModeType >= ModeEGA )
+1 −13
Original line number Diff line number Diff line
@@ -28,22 +28,10 @@ typedef unsigned short USHORT;
typedef unsigned long ULONG;
#endif

#ifndef PUSHORT
typedef USHORT *PUSHORT;
#endif

#ifndef PLONGU
typedef ULONG *PULONG;
#endif

#ifndef VOID
typedef void VOID;
#endif

#ifndef PVOID
typedef void *PVOID;
#endif

#ifndef BOOLEAN
typedef UCHAR BOOLEAN;
#endif
@@ -126,7 +114,7 @@ struct _XGI_HW_DEVICE_INFO

    BOOLEAN UseROM;		 /* Use the ROM image if provided */

    PVOID   pDevice;
    void *pDevice;

    unsigned char *pjVideoMemoryAddress;/* base virtual memory address */
                                 /* of Linear VGA memory */