Commit 108afbf8 authored by Bill Pemberton's avatar Bill Pemberton Committed by Greg Kroah-Hartman

Staging: xgifb: Remove SHORT, UCHAR, and LONG typedef

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 82d6eb5b
......@@ -888,7 +888,7 @@ unsigned char XGIfb_query_VGA_config_space(PXGI_HW_DEVICE_INFO pXGIhw_ex
/* Routines from init.c/init301.c */
extern void InitTo330Pointer(UCHAR,PVB_DEVICE_INFO pVBInfo);
extern void InitTo330Pointer(unsigned char, PVB_DEVICE_INFO pVBInfo);
extern unsigned char XGIInitNew(PXGI_HW_DEVICE_INFO HwDeviceExtension);
extern unsigned char XGISetModeNew(PXGI_HW_DEVICE_INFO HwDeviceExtension,
unsigned short ModeNo);
......
......@@ -9,8 +9,8 @@
#include "vb_util.h"
#include "vb_setmode.h"
#include "vb_ext.h"
extern UCHAR XGI330_SoftSetting;
extern UCHAR XGI330_OutputSelect;
extern unsigned char XGI330_SoftSetting;
extern unsigned char XGI330_OutputSelect;
extern unsigned short XGI330_RGBSenseData2;
extern unsigned short XGI330_YCSenseData2;
extern unsigned short XGI330_VideoSenseData2;
......@@ -139,7 +139,7 @@ void XGISetDPMS(PXGI_HW_DEVICE_INFO pXGIHWDE,
unsigned long VESA_POWER_STATE)
{
unsigned short ModeNo, ModeIdIndex;
UCHAR temp ;
unsigned char temp;
VB_DEVICE_INFO VBINF;
PVB_DEVICE_INFO pVBInfo = &VBINF;
pVBInfo->BaseAddr = (unsigned long)pXGIHWDE->pjIOAddress ;
......@@ -209,18 +209,18 @@ void XGISetDPMS(PXGI_HW_DEVICE_INFO pXGIHWDE,
}
if ( VESA_POWER_STATE == 0x00000400 )
XGINew_SetReg1( pVBInfo->Part4Port , 0x31 , ( UCHAR )( XGINew_GetReg1( pVBInfo->Part4Port , 0x31 ) & 0xFE ) ) ;
XGINew_SetReg1(pVBInfo->Part4Port, 0x31, (unsigned char)(XGINew_GetReg1(pVBInfo->Part4Port, 0x31) & 0xFE));
else
XGINew_SetReg1( pVBInfo->Part4Port , 0x31 , ( UCHAR )( XGINew_GetReg1( pVBInfo->Part4Port , 0x31 ) | 0x01 ) ) ;
XGINew_SetReg1(pVBInfo->Part4Port, 0x31, (unsigned char)(XGINew_GetReg1(pVBInfo->Part4Port, 0x31) | 0x01));
temp = ( UCHAR )XGINew_GetReg1( pVBInfo->P3c4 , 0x1f ) ;
temp = (unsigned char)XGINew_GetReg1(pVBInfo->P3c4, 0x1f);
temp &= 0x3f ;
switch ( VESA_POWER_STATE )
{
case 0x00000000: /* on */
if ( ( pXGIHWDE->ujVBChipID == VB_CHIP_301 ) || ( pXGIHWDE->ujVBChipID == VB_CHIP_302 ) )
{
XGINew_SetReg1( pVBInfo->P3c4 , 0x1f , ( UCHAR )( temp | 0x00 ) ) ;
XGINew_SetReg1(pVBInfo->P3c4, 0x1f, (unsigned char)(temp | 0x00));
XGI_EnableBridge( pXGIHWDE, pVBInfo ) ;
}
else
......@@ -278,7 +278,7 @@ void XGISetDPMS(PXGI_HW_DEVICE_INFO pXGIHWDE,
XGI_DisplayOff( pXGIHWDE, pVBInfo );
}
XGINew_SetReg1( pVBInfo->P3c4 , 0x1f , ( UCHAR )( temp | 0x40 ) ) ;
XGINew_SetReg1(pVBInfo->P3c4, 0x1f, (unsigned char)(temp | 0x40));
break ;
case 0x00000200: /* suspend */
if ( pXGIHWDE->jChipType == XG21 )
......@@ -291,12 +291,12 @@ void XGISetDPMS(PXGI_HW_DEVICE_INFO pXGIHWDE,
XGI_DisplayOff( pXGIHWDE, pVBInfo );
XGI_XG27BLSignalVDD( 0x20 , 0x00, pVBInfo ) ; /* LVDS signal off */
}
XGINew_SetReg1( pVBInfo->P3c4 , 0x1f , ( UCHAR )( temp | 0x80 ) ) ;
XGINew_SetReg1(pVBInfo->P3c4, 0x1f, (unsigned char)(temp | 0x80));
break ;
case 0x00000400: /* off */
if ( (pXGIHWDE->ujVBChipID == VB_CHIP_301 ) || ( pXGIHWDE->ujVBChipID == VB_CHIP_302 ) )
{
XGINew_SetReg1( pVBInfo->P3c4 , 0x1f , ( UCHAR )( temp | 0xc0 ) ) ;
XGINew_SetReg1(pVBInfo->P3c4, 0x1f, (unsigned char)(temp | 0xc0));
XGI_DisableBridge( pXGIHWDE, pVBInfo ) ;
}
else
......@@ -837,7 +837,7 @@ void XGI_XG21Fun14Sub70( PVB_DEVICE_INFO pVBInfo , PX86_REGS pBiosArguments )
ModeNo = pVBInfo->EModeIDTable[ ModeIdIndex ].Ext_ModeID;
if ( pVBInfo->EModeIDTable[ ModeIdIndex ].Ext_ModeID == 0xFF )
{
pBiosArguments->h.bh = (UCHAR) EModeCount;
pBiosArguments->h.bh = (unsigned char) EModeCount;
return;
}
if ( !XGI_XG21CheckLVDSMode( ModeNo , ModeIdIndex, pVBInfo) )
......@@ -883,7 +883,7 @@ void XGI_XG21Fun14Sub71( PVB_DEVICE_INFO pVBInfo , PX86_REGS pBiosArguments )
if (EModeCount == EModeIndex)
{
resindex = XGI_GetResInfo( ModeNo , ModeIdIndex, pVBInfo ) ;
pBiosArguments->h.bl = (UCHAR) ModeNo;
pBiosArguments->h.bl = (unsigned char) ModeNo;
pBiosArguments->x.cx = pVBInfo->ModeResInfo[ resindex ].HTotal ; /* xres->ax */
pBiosArguments->x.dx = pVBInfo->ModeResInfo[ resindex ].VTotal ; /* yres->bx */
pBiosArguments->x.ax = 0x0014;
......@@ -966,7 +966,7 @@ void XGI_XG21Fun14Sub72( PVB_DEVICE_INFO pVBInfo , PX86_REGS pBiosArguments )
*/
void XGI_XG21Fun14Sub73( PVB_DEVICE_INFO pVBInfo , PX86_REGS pBiosArguments )
{
UCHAR Select;
unsigned char Select;
unsigned short lvdstableindex;
......
......@@ -11,7 +11,8 @@ struct WORDREGS {
};
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 {
......@@ -25,7 +26,8 @@ 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 void ReadVBIOSTablData(unsigned char ChipType,
PVB_DEVICE_INFO pVBInfo);
extern unsigned short XGINew_SenseLCD(PXGI_HW_DEVICE_INFO,
PVB_DEVICE_INFO pVBInfo);
......
This diff is collapsed.
This diff is collapsed.
#ifndef _VBSETMODE_
#define _VBSETMODE_
extern void InitTo330Pointer(UCHAR,PVB_DEVICE_INFO);
extern void InitTo330Pointer(unsigned char, PVB_DEVICE_INFO);
extern void XGI_UnLockCRT2(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO );
extern void XGI_LockCRT2(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO );
extern void XGI_LongWait( PVB_DEVICE_INFO );
......
This diff is collapsed.
This diff is collapsed.
......@@ -10,8 +10,8 @@ void XGINew_SetReg1(unsigned long,unsigned short,unsigned short);
void XGINew_SetReg2(unsigned long,unsigned short,unsigned short);
void XGINew_SetReg3(unsigned long,unsigned short);
void XGINew_SetReg4(unsigned long,unsigned long);
UCHAR XGINew_GetReg1(unsigned long,unsigned short);
UCHAR XGINew_GetReg2(unsigned long);
unsigned char XGINew_GetReg1(unsigned long, unsigned short);
unsigned char XGINew_GetReg2(unsigned long);
unsigned long XGINew_GetReg3(unsigned long);
void XGINew_ClearDAC(unsigned char *);
void XGINew_SetRegANDOR(unsigned long Port,unsigned short Index,
......@@ -43,7 +43,7 @@ void XGINew_SetReg1( unsigned long port , unsigned short index , unsigned short
/* --------------------------------------------------------------------- */
/*void XGINew_SetReg2( unsigned long port , unsigned short index , unsigned short data )
{
InPortByte( ( PUCHAR )port + 0x3da - 0x3c0 ) ;
InPortByte((P unsigned char )port + 0x3da - 0x3c0) ;
OutPortByte( XGINew_P3c0 , index ) ;
OutPortByte( XGINew_P3c0 , data ) ;
OutPortByte( XGINew_P3c0 , 0x20 ) ;
......@@ -80,9 +80,9 @@ void XGINew_SetReg4( unsigned long port , unsigned long data )
/* Output : */
/* Description : */
/* --------------------------------------------------------------------- */
UCHAR XGINew_GetReg1( unsigned long port , unsigned short index )
unsigned char XGINew_GetReg1(unsigned long port, unsigned short index)
{
UCHAR data ;
unsigned char data ;
outb(index, port);
data = inb(port + 1) ;
......@@ -96,9 +96,9 @@ UCHAR XGINew_GetReg1( unsigned long port , unsigned short index )
/* Output : */
/* Description : */
/* --------------------------------------------------------------------- */
UCHAR XGINew_GetReg2( unsigned long port )
unsigned char XGINew_GetReg2(unsigned long port)
{
UCHAR data ;
unsigned char data ;
data = inb(port) ;
......@@ -197,7 +197,7 @@ void NewDelaySeconds( int seconds )
/* Output : */
/* Description : */
/* --------------------------------------------------------------------- */
void Newdebugcode( UCHAR code )
void Newdebugcode(unsigned char code)
{
// OutPortByte ( 0x80 , code ) ;
/* OutPortByte ( 0x300 , code ) ; */
......
#ifndef _VBUTIL_
#define _VBUTIL_
extern void NewDelaySeconds( int );
extern void Newdebugcode( UCHAR );
extern void Newdebugcode(unsigned char);
extern void XGINew_SetReg1(unsigned long, unsigned short, unsigned short);
extern void XGINew_SetReg3(unsigned long, unsigned short);
extern UCHAR XGINew_GetReg1(unsigned long, unsigned short);
extern UCHAR XGINew_GetReg2(unsigned long);
extern unsigned char XGINew_GetReg1(unsigned long, unsigned short);
extern unsigned char XGINew_GetReg2(unsigned long);
extern void XGINew_SetReg4(unsigned long, unsigned long);
extern unsigned long XGINew_GetReg3(unsigned long);
extern void XGINew_SetRegOR(unsigned long Port,unsigned short Index,unsigned short DataOR);
......
......@@ -4,25 +4,6 @@
#include <linux/ioctl.h>
#ifndef CHAR
typedef char CHAR;
#endif
#ifndef SHORT
typedef short SHORT;
#endif
#ifndef LONG
typedef long LONG;
#endif
#ifndef UCHAR
typedef unsigned char UCHAR;
#endif
typedef unsigned long XGIIOADDRESS;
#ifndef VBIOS_VER_MAX_LENGTH
#define VBIOS_VER_MAX_LENGTH 4
#endif
......@@ -74,8 +55,8 @@ typedef enum _XGI_LCD_TYPE {
#ifndef PXGI_DSReg
typedef struct _XGI_DSReg
{
UCHAR jIdx;
UCHAR jVal;
unsigned char jIdx;
unsigned char jVal;
} XGI_DSReg, *PXGI_DSReg;
#endif
......@@ -109,13 +90,13 @@ struct _XGI_HW_DEVICE_INFO
unsigned long ul2ndVideoMemorySize;
unsigned char *pj2ndIOAddress;
UCHAR jChipType; /* Used to Identify Graphics Chip */
unsigned char jChipType; /* Used to Identify Graphics Chip */
/* defined in the data structure type */
/* "XGI_CHIP_TYPE" */
UCHAR jChipRevision; /* Used to Identify Graphics Chip Revision */
unsigned char jChipRevision; /* Used to Identify Graphics Chip Revision */
UCHAR ujVBChipID; /* the ID of video bridge */
unsigned char ujVBChipID; /* the ID of video bridge */
/* defined in the data structure type */
/* "XGI_VB_CHIP_TYPE" */
......@@ -152,7 +133,7 @@ struct _XGI_HW_DEVICE_INFO
PXGI_QUERYSPACE pQueryNorthBridgeSpace;
UCHAR szVBIOSVer[VBIOS_VER_MAX_LENGTH];
unsigned char szVBIOSVer[VBIOS_VER_MAX_LENGTH];
};
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment