Skip to content

Commit

Permalink
Staging: xgifb: Remove use of LINUX_XF86 define
Browse files Browse the repository at this point in the history
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Bill Pemberton authored and Greg Kroah-Hartman committed Jun 22, 2010
1 parent 784cfe1 commit 84c7603
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 134 deletions.
18 changes: 0 additions & 18 deletions drivers/staging/xgifb/osdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#define _OSDEF_H_

#define LINUX_KERNEL
/* #define LINUX_XF86 */

/**********************************************************************/
#ifdef LINUX_KERNEL
Expand All @@ -11,27 +10,18 @@


/**********************************************************************/
#ifdef LINUX_XF86
#define LINUX
#endif
#ifdef LINUX_KERNEL
#define LINUX
#endif

/**********************************************************************/
#ifdef LINUX_XF86
#define XGI_SetMemory(MemoryAddress,MemorySize,value) memset(MemoryAddress, value, MemorySize)
#endif
#ifdef LINUX_KERNEL
#define XGI_SetMemory(MemoryAddress,MemorySize,value) memset(MemoryAddress, value, MemorySize)
#endif
/**********************************************************************/

/**********************************************************************/

#ifdef LINUX_XF86
#define XGI_MemoryCopy(Destination,Soruce,Length) memcpy(Destination,Soruce,Length)
#endif
#ifdef LINUX_KERNEL
#define XGI_MemoryCopy(Destination,Soruce,Length) memcpy(Destination,Soruce,Length)
#endif
Expand Down Expand Up @@ -71,14 +61,6 @@
/* LINUX XF86 */
/**********************************************************************/

#ifdef LINUX_XF86
#define OutPortByte(p,v) outb((CARD16)(p),(CARD8)(v))
#define OutPortWord(p,v) outw((CARD16)(p),(CARD16)(v))
#define OutPortLong(p,v) outl((CARD16)(p),(CARD32)(v))
#define InPortByte(p) inb((CARD16)(p))
#define InPortWord(p) inw((CARD16)(p))
#define InPortLong(p) inl((CARD16)(p))
#endif

#ifdef LINUX_KERNEL
#define OutPortByte(p,v) outb((u8)(v),(p))
Expand Down
6 changes: 0 additions & 6 deletions drivers/staging/xgifb/vb_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@



#ifdef LINUX_XF86
#include "xf86.h"
#include "xf86PciInfo.h"
#include "xgi.h"
#include "xgi_regs.h"
#endif

#ifdef LINUX_KERNEL
#include <linux/version.h>
Expand Down
11 changes: 2 additions & 9 deletions drivers/staging/xgifb/vb_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@
#include "vb_init.h"
#include "vb_ext.h"

#ifdef LINUX_XF86
#include "xf86.h"
#include "xf86PciInfo.h"
#include "xgi.h"
#include "xgi_regs.h"
#endif

#ifdef LINUX_KERNEL
#include <asm/io.h>
Expand Down Expand Up @@ -2674,7 +2668,7 @@ void SetPowerConsume ( PXGI_HW_DEVICE_INFO HwDeviceExtension , ULONG XGI_P3d4Por



#if defined(LINUX_XF86)||defined(LINUX_KERNEL)
#if defined(LINUX_KERNEL)
void XGINew_InitVBIOSData(PXGI_HW_DEVICE_INFO HwDeviceExtension, PVB_DEVICE_INFO pVBInfo)
{

Expand Down Expand Up @@ -3103,9 +3097,8 @@ void XGINew_SetDRAMModeRegister_XG27( PXGI_HW_DEVICE_INFO HwDeviceExtension )
/*
void XGINew_SetDRAMModeRegister_XG27( PXGI_HW_DEVICE_INFO HwDeviceExtension )
{
#ifndef LINUX_XF86
UCHAR data ;
#endif
VB_DEVICE_INFO VBINF;
PVB_DEVICE_INFO pVBInfo = &VBINF;
pVBInfo->ROMAddr = HwDeviceExtension->pjVirtualRomBase ;
Expand Down
11 changes: 0 additions & 11 deletions drivers/staging/xgifb/vb_setmode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@



#ifdef LINUX_XF86
#include "xf86.h"
#include "xf86PciInfo.h"
#include "xgi.h"
#include "xgi_regs.h"
#endif

#ifdef LINUX_KERNEL
#include <asm/io.h>
Expand Down Expand Up @@ -2609,9 +2603,7 @@ void XGI_ClearBuffer( PXGI_HW_DEVICE_INFO HwDeviceExtension , USHORT ModeNo, PVB
PVOID VideoMemoryAddress = ( PVOID )HwDeviceExtension->pjVideoMemoryAddress ;
ULONG AdapterMemorySize = ( ULONG )HwDeviceExtension->ulVideoMemorySize ;
PUSHORT pBuffer ;
#ifndef LINUX_XF86
int i ;
#endif

if ( pVBInfo->ModeType >= ModeEGA )
{
Expand Down Expand Up @@ -4901,10 +4893,7 @@ UCHAR XGI_GetVCLKPtr(USHORT RefreshRateTableIndex,USHORT ModeNo,USHORT ModeIdInd

USHORT index ,
modeflag ;
#ifndef LINUX_XF86
USHORT tempbx ;
#endif

UCHAR tempal ;
UCHAR *CHTVVCLKPtr = NULL ;

Expand Down
22 changes: 0 additions & 22 deletions drivers/staging/xgifb/vb_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,6 @@
#include <linux/types.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 ) ;
void XGINew_SetReg3( ULONG , USHORT ) ;
Expand All @@ -42,13 +30,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
}


Expand Down Expand Up @@ -101,13 +84,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

return( data ) ;
}
Expand Down
68 changes: 0 additions & 68 deletions drivers/staging/xgifb/vgatypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@

#include "osdef.h"

#ifdef LINUX_XF86
#include "xf86Version.h"
#include "xf86Pci.h"
#endif

#ifdef LINUX_KERNEL /* We don't want the X driver to depend on kernel source */
#include <linux/ioctl.h>
Expand Down Expand Up @@ -81,14 +77,6 @@ typedef UCHAR bool;
typedef unsigned long XGIIOADDRESS;
#endif

#ifdef LINUX_XF86
#if XF86_VERSION_CURRENT < XF86_VERSION_NUMERIC(4,2,0,0,0)
typedef unsigned char IOADDRESS;
typedef unsigned char XGIIOADDRESS;
#else
typedef IOADDRESS XGIIOADDRESS;
#endif
#endif

#ifndef VBIOS_VER_MAX_LENGTH
#define VBIOS_VER_MAX_LENGTH 4
Expand All @@ -98,10 +86,6 @@ typedef IOADDRESS XGIIOADDRESS;
#ifndef XGI_CHIP_TYPE
typedef enum _XGI_CHIP_TYPE {
XGI_VGALegacy = 0,
#ifdef LINUX_XF86
XGI_530,
XGI_OLD,
#endif
XGI_300,
XGI_630,
XGI_640,
Expand Down Expand Up @@ -190,9 +174,6 @@ struct _XGI_HW_DEVICE_INFO
{
ULONG ulExternalChip; /* NO VB or other video bridge*/
/* if ujVBChipID = VB_CHIP_UNKNOWN, */
#ifdef LINUX_XF86
PCITAG PciTag; /* PCI Tag */
#endif

PUCHAR pjVirtualRomBase; /* ROM image */

Expand Down Expand Up @@ -264,55 +245,6 @@ struct _XGI_HW_DEVICE_INFO
/* Addtional IOCTL for communication xgifb <> X driver */
/* If changing this, xgifb.h must also be changed (for xgifb) */

#ifdef LINUX_XF86 /* We don't want the X driver to depend on the kernel source */

/* ioctl for identifying and giving some info (esp. memory heap start) */
#define XGIFB_GET_INFO 0x80046ef8 /* Wow, what a terrible hack... */

/* Structure argument for XGIFB_GET_INFO ioctl */
typedef struct _XGIFB_INFO xgifb_info, *pxgifb_info;

struct _XGIFB_INFO {
CARD32 xgifb_id; /* for identifying xgifb */
#ifndef XGIFB_ID
#define XGIFB_ID 0x53495346 /* Identify myself with 'XGIF' */
#endif
CARD32 chip_id; /* PCI ID of detected chip */
CARD32 memory; /* video memory in KB which xgifb manages */
CARD32 heapstart; /* heap start (= xgifb "mem" argument) in KB */
CARD8 fbvidmode; /* current xgifb mode */

CARD8 xgifb_version;
CARD8 xgifb_revision;
CARD8 xgifb_patchlevel;

CARD8 xgifb_caps; /* xgifb's capabilities */

CARD32 xgifb_tqlen; /* turbo queue length (in KB) */

CARD32 xgifb_pcibus; /* The card's PCI ID */
CARD32 xgifb_pcislot;
CARD32 xgifb_pcifunc;

CARD8 xgifb_lcdpdc;

CARD8 xgifb_lcda;

CARD32 xgifb_vbflags;
CARD32 xgifb_currentvbflags;

CARD32 xgifb_scalelcd;
CARD32 xgifb_specialtiming;

CARD8 xgifb_haveemi;
CARD8 xgifb_emi30,xgifb_emi31,xgifb_emi32,xgifb_emi33;
CARD8 xgifb_haveemilcd;

CARD8 xgifb_lcdpdca;

CARD8 reserved[212]; /* for future use */
};
#endif

#endif

0 comments on commit 84c7603

Please sign in to comment.