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

Commit 8922967e authored by Randy Dunlap's avatar Randy Dunlap Committed by Greg Kroah-Hartman
Browse files

Staging: xgifb: fix lots of sparse warnings



Fix many sparse warnings about data or functions being static.
Fix many sparse warnings about data or functions not being used
  (put them inside #if 0/#endif blocks).
Fix sparse warnings about 0 being used for NULL.
Fixed a small bit of source formatting when those lines were being
  modified anyway, but there is still lots of this yet to be done.

Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
Cc: devel@driverdev.osuosl.org
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 6a4ca039
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -179,7 +179,7 @@


/* TW: BR(16)+2 = 0x8242 */
/* TW: BR(16)+2 = 0x8242 */


int     xgiCmdQueLen;
static int     xgiCmdQueLen;


#define XGI300Idle \
#define XGI300Idle \
  { \
  { \
@@ -488,6 +488,7 @@ int xgiCmdQueLen;


int  XGIfb_initaccel(void);
int  XGIfb_initaccel(void);
void XGIfb_syncaccel(void);
void XGIfb_syncaccel(void);
int fbcon_XGI_sync(struct fb_info *info);


extern struct video_info xgi_video_info;
extern struct video_info xgi_video_info;


+12 −15
Original line number Original line Diff line number Diff line
@@ -350,20 +350,17 @@ static int enable_dstn = 0;
static int XGIfb_ypan = -1;
static int XGIfb_ypan = -1;




int 	   XGIfb_accel = 0;


static int XGIfb_hwcursor_size = 0;
static int XGIfb_hwcursor_size = 0;
static int XGIfb_CRT2_write_enable = 0;
static int XGIfb_CRT2_write_enable = 0;


int XGIfb_crt2type  = -1;	/* TW: CRT2 type (for overriding autodetection) */
static int XGIfb_crt2type = -1; /* TW: CRT2 type (for overriding autodetection) */
int XGIfb_tvplug    = -1;	/* PR: Tv plug type (for overriding autodetection) */
static int XGIfb_tvplug = -1; /* PR: Tv plug type (for overriding autodetection) */


int XGIfb_queuemode = -1; 	/* TW: Use MMIO queue mode by default (310/325 series only) */
static int XGIfb_queuemode = -1; /* TW: Use MMIO queue mode by default (310/325 series only) */


unsigned char XGIfb_detectedpdc = 0;
static unsigned char XGIfb_detectedpdc = 0;


unsigned char XGIfb_detectedlcda = 0xff;
static unsigned char XGIfb_detectedlcda = 0xff;






@@ -372,10 +369,10 @@ unsigned char XGIfb_detectedlcda = 0xff;
/* XGIfb_info XGIfbinfo; */
/* XGIfb_info XGIfbinfo; */


/* TW: Hardware extension; contains data on hardware */
/* TW: Hardware extension; contains data on hardware */
struct xgi_hw_device_info XGIhw_ext;
static struct xgi_hw_device_info XGIhw_ext;


/* TW: XGI private structure */
/* TW: XGI private structure */
struct vb_device_info  XGI_Pr;
static struct vb_device_info  XGI_Pr;


/* card parameters */
/* card parameters */
static unsigned long XGIfb_mmio_size = 0;
static unsigned long XGIfb_mmio_size = 0;
@@ -392,7 +389,7 @@ typedef enum _XGI_CMDTYPE {


/* mode table */
/* mode table */
/* NOT const - will be patched for 1280x960 mode number chaos reasons */
/* NOT const - will be patched for 1280x960 mode number chaos reasons */
struct _XGIbios_mode {
static struct _XGIbios_mode {
	char name[15];
	char name[15];
	u8 mode_no;
	u8 mode_no;
	u16 vesa_mode_no_1;  /* "XGI defined" VESA mode number */
	u16 vesa_mode_no_1;  /* "XGI defined" VESA mode number */
@@ -491,17 +488,17 @@ static int xgifb_mode_idx = 1;
#else
#else
static int xgifb_mode_idx = -1;               /* Use a default mode if we are inside the kernel */
static int xgifb_mode_idx = -1;               /* Use a default mode if we are inside the kernel */
#endif
#endif
u8  XGIfb_mode_no  = 0;
static u8  XGIfb_mode_no  = 0;
u8  XGIfb_rate_idx = 0;
static u8  XGIfb_rate_idx = 0;


/* TW: CR36 evaluation */
/* TW: CR36 evaluation */
const unsigned short XGI300paneltype[] =
static const unsigned short XGI300paneltype[] =
    { LCD_UNKNOWN,   LCD_800x600,  LCD_1024x768,  LCD_1280x1024,
    { LCD_UNKNOWN,   LCD_800x600,  LCD_1024x768,  LCD_1280x1024,
      LCD_1280x960,  LCD_640x480,  LCD_1024x600,  LCD_1152x768,
      LCD_1280x960,  LCD_640x480,  LCD_1024x600,  LCD_1152x768,
       LCD_1024x768, LCD_1024x768,  LCD_1024x768,
       LCD_1024x768, LCD_1024x768,  LCD_1024x768,
      LCD_1024x768,  LCD_1024x768, LCD_1024x768,  LCD_1024x768 };
      LCD_1024x768,  LCD_1024x768, LCD_1024x768,  LCD_1024x768 };


const unsigned short XGI310paneltype[] =
static const unsigned short XGI310paneltype[] =
    { LCD_UNKNOWN,   LCD_800x600,  LCD_1024x768,  LCD_1280x1024,
    { LCD_UNKNOWN,   LCD_800x600,  LCD_1024x768,  LCD_1280x1024,
      LCD_640x480,   LCD_1024x600, LCD_1152x864,  LCD_1280x960,
      LCD_640x480,   LCD_1024x600, LCD_1152x864,  LCD_1280x960,
      LCD_1152x768,  LCD_1400x1050,LCD_1280x768,  LCD_1600x1200,
      LCD_1152x768,  LCD_1400x1050,LCD_1280x768,  LCD_1600x1200,
+17 −12
Original line number Original line Diff line number Diff line
@@ -44,6 +44,8 @@
#include "XGI_main.h"
#include "XGI_main.h"
#include "vb_util.h"
#include "vb_util.h"


int XGIfb_accel = 0;



#define Index_CR_GPIO_Reg1 0x48
#define Index_CR_GPIO_Reg1 0x48
#define Index_CR_GPIO_Reg2 0x49
#define Index_CR_GPIO_Reg2 0x49
@@ -161,8 +163,9 @@ struct video_info xgi_video_info;


/* --------------- Hardware Access Routines -------------------------- */
/* --------------- Hardware Access Routines -------------------------- */


int
static int
XGIfb_mode_rate_to_dclock(struct vb_device_info *XGI_Pr, struct xgi_hw_device_info *HwDeviceExtension,
XGIfb_mode_rate_to_dclock(struct vb_device_info *XGI_Pr,
			  struct xgi_hw_device_info *HwDeviceExtension,
			  unsigned char modeno, unsigned char rateindex)
			  unsigned char modeno, unsigned char rateindex)
{
{
    unsigned short ModeNo = modeno;
    unsigned short ModeNo = modeno;
@@ -196,8 +199,9 @@ XGIfb_mode_rate_to_dclock(struct vb_device_info *XGI_Pr, struct xgi_hw_device_in
    return(Clock);
    return(Clock);
}
}


int
static int
XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr, struct xgi_hw_device_info *HwDeviceExtension,
XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr,
			 struct xgi_hw_device_info *HwDeviceExtension,
			 unsigned char modeno, unsigned char rateindex,
			 unsigned char modeno, unsigned char rateindex,
			 u32 *left_margin, u32 *right_margin,
			 u32 *left_margin, u32 *right_margin,
			 u32 *upper_margin, u32 *lower_margin,
			 u32 *upper_margin, u32 *lower_margin,
@@ -377,7 +381,7 @@ XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr, struct xgi_hw_device_inf






void XGIRegInit(struct vb_device_info *XGI_Pr, unsigned long BaseAddr)
static void XGIRegInit(struct vb_device_info *XGI_Pr, unsigned long BaseAddr)
{
{
   XGI_Pr->RelIO = BaseAddr;
   XGI_Pr->RelIO = BaseAddr;
   XGI_Pr->P3c4 = BaseAddr + 0x14;
   XGI_Pr->P3c4 = BaseAddr + 0x14;
@@ -570,7 +574,7 @@ static void XGIfb_search_vesamode(unsigned int vesamode)
	if(!j) printk(KERN_INFO "XGIfb: Invalid VESA mode 0x%x'\n", vesamode);
	if(!j) printk(KERN_INFO "XGIfb: Invalid VESA mode 0x%x'\n", vesamode);
}
}


int XGIfb_GetXG21LVDSData(void)
static int XGIfb_GetXG21LVDSData(void)
{
{
    u8 tmp;
    u8 tmp;
    unsigned char *pData;
    unsigned char *pData;
@@ -2057,9 +2061,9 @@ static int XGIfb_heap_init(void)


	int            agp_enabled = 1;
	int            agp_enabled = 1;
	u32            agp_size;
	u32            agp_size;
	unsigned long *cmdq_baseport = 0;
	unsigned long *cmdq_baseport = NULL;
	unsigned long *read_port = 0;
	unsigned long *read_port = NULL;
	unsigned long *write_port = 0;
	unsigned long *write_port = NULL;
	XGI_CMDTYPE    cmd_type;
	XGI_CMDTYPE    cmd_type;
#ifndef AGPOFF
#ifndef AGPOFF
	struct agp_kern_info  *agp_info;
	struct agp_kern_info  *agp_info;
@@ -2827,7 +2831,7 @@ XGIINITSTATIC int __init XGIfb_setup(char *options)


static unsigned char VBIOS_BUF[65535];
static unsigned char VBIOS_BUF[65535];


unsigned char *attempt_map_rom(struct pci_dev *dev, void *copy_address)
static unsigned char *attempt_map_rom(struct pci_dev *dev, void *copy_address)
{
{
    u32 rom_size      = 0;
    u32 rom_size      = 0;
    u32 rom_address   = 0;
    u32 rom_address   = 0;
@@ -2872,7 +2876,8 @@ unsigned char *attempt_map_rom(struct pci_dev *dev, void *copy_address)
	return copy_address;
	return copy_address;
}
}


int __devinit xgifb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
static int __devinit xgifb_probe(struct pci_dev *pdev,
				 const struct pci_device_id *ent)
{
{
	u16 reg16;
	u16 reg16;
	u8  reg, reg1;
	u8  reg, reg1;
@@ -3641,7 +3646,7 @@ MODULE_PARM_DESC(nocrt2rate,






int __init xgifb_init_module(void)
static int __init xgifb_init_module(void)
{
{
        printk("\nXGIfb_init_module");
        printk("\nXGIfb_init_module");
	if(mode)
	if(mode)
+9 −5
Original line number Original line Diff line number Diff line
@@ -44,7 +44,7 @@ unsigned char XGI_Is301LV(struct vb_device_info *);
/* Output : */
/* Output : */
/* Description : */
/* Description : */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
unsigned char XGINew_Is301B(struct vb_device_info *pVBInfo)
static unsigned char XGINew_Is301B(struct vb_device_info *pVBInfo)
{
{
    unsigned short flag ;
    unsigned short flag ;


@@ -816,7 +816,8 @@ unsigned char XGINew_SenseHiTV(struct xgi_hw_device_info *HwDeviceExtension, str
;		     DX: PAnel V. resolution
;		     DX: PAnel V. resolution
;-----------------------------------------------------------------------------
;-----------------------------------------------------------------------------
*/
*/
void XGI_XG21Fun14Sub70(struct vb_device_info *pVBInfo, PX86_REGS pBiosArguments)
static void XGI_XG21Fun14Sub70(struct vb_device_info *pVBInfo,
				PX86_REGS pBiosArguments)
{
{


    unsigned short ModeIdIndex;
    unsigned short ModeIdIndex;
@@ -859,7 +860,8 @@ void XGI_XG21Fun14Sub70(struct vb_device_info *pVBInfo, PX86_REGS pBiosArguments
;
;
;-----------------------------------------------------------------------------
;-----------------------------------------------------------------------------
*/
*/
void XGI_XG21Fun14Sub71(struct vb_device_info *pVBInfo, PX86_REGS pBiosArguments)
static void XGI_XG21Fun14Sub71(struct vb_device_info *pVBInfo,
				PX86_REGS pBiosArguments)
{
{


    unsigned short EModeCount;
    unsigned short EModeCount;
@@ -905,7 +907,8 @@ void XGI_XG21Fun14Sub71(struct vb_device_info *pVBInfo, PX86_REGS pBiosArguments
;
;
;-----------------------------------------------------------------------------
;-----------------------------------------------------------------------------
*/
*/
void XGI_XG21Fun14Sub72(struct vb_device_info *pVBInfo, PX86_REGS pBiosArguments)
static void XGI_XG21Fun14Sub72(struct vb_device_info *pVBInfo,
				PX86_REGS pBiosArguments)
{
{
    unsigned short ModeIdIndex, resindex;
    unsigned short ModeIdIndex, resindex;
    unsigned short ModeNo;
    unsigned short ModeNo;
@@ -964,7 +967,8 @@ void XGI_XG21Fun14Sub72(struct vb_device_info *pVBInfo, PX86_REGS pBiosArguments
;                       BX[6]: *Value1 D[6] Panel H. Polarity
;                       BX[6]: *Value1 D[6] Panel H. Polarity
;-----------------------------------------------------------------------------
;-----------------------------------------------------------------------------
*/
*/
void XGI_XG21Fun14Sub73(struct vb_device_info *pVBInfo, PX86_REGS pBiosArguments)
static void XGI_XG21Fun14Sub73(struct vb_device_info *pVBInfo,
				PX86_REGS pBiosArguments)
{
{
    unsigned char Select;
    unsigned char Select;


+63 −45
Original line number Original line Diff line number Diff line
@@ -18,7 +18,7 @@






unsigned char XGINew_ChannelAB, XGINew_DataBusWidth;
static unsigned char XGINew_ChannelAB, XGINew_DataBusWidth;


unsigned short XGINew_DRAMType[17][5] = {
unsigned short XGINew_DRAMType[17][5] = {
	{0x0C, 0x0A, 0x02, 0x40, 0x39}, {0x0D, 0x0A, 0x01, 0x40, 0x48},
	{0x0C, 0x0A, 0x02, 0x40, 0x39}, {0x0D, 0x0A, 0x01, 0x40, 0x48},
@@ -31,7 +31,7 @@ unsigned short XGINew_DRAMType[17][5] = {
	{0x0B, 0x08, 0x01, 0x04, 0x20}, {0x0A, 0x08, 0x01, 0x02, 0x10},
	{0x0B, 0x08, 0x01, 0x04, 0x20}, {0x0A, 0x08, 0x01, 0x02, 0x10},
	{0x09, 0x08, 0x01, 0x01, 0x00} };
	{0x09, 0x08, 0x01, 0x01, 0x00} };


unsigned short XGINew_SDRDRAM_TYPE[13][5] = {
static unsigned short XGINew_SDRDRAM_TYPE[13][5] = {
	{ 2, 12, 9, 64, 0x35},
	{ 2, 12, 9, 64, 0x35},
	{ 1, 13, 9, 64, 0x44},
	{ 1, 13, 9, 64, 0x44},
	{ 2, 12, 8, 32, 0x31},
	{ 2, 12, 8, 32, 0x31},
@@ -46,19 +46,19 @@ unsigned short XGINew_SDRDRAM_TYPE[13][5] = {
	{ 1, 10, 8,  4, 0x10},
	{ 1, 10, 8,  4, 0x10},
	{ 1,  9, 8,  2, 0x00} };
	{ 1,  9, 8,  2, 0x00} };


unsigned short XGINew_DDRDRAM_TYPE[4][5] = {
static unsigned short XGINew_DDRDRAM_TYPE[4][5] = {
	{ 2, 12, 9, 64, 0x35},
	{ 2, 12, 9, 64, 0x35},
	{ 2, 12, 8, 32, 0x31},
	{ 2, 12, 8, 32, 0x31},
	{ 2, 11, 8, 16, 0x21},
	{ 2, 11, 8, 16, 0x21},
	{ 2,  9, 8,  4, 0x01} };
	{ 2,  9, 8,  4, 0x01} };


unsigned short XGINew_DDRDRAM_TYPE340[4][5] = {
static unsigned short XGINew_DDRDRAM_TYPE340[4][5] = {
	{ 2, 13, 9, 64, 0x45},
	{ 2, 13, 9, 64, 0x45},
	{ 2, 12, 9, 32, 0x35},
	{ 2, 12, 9, 32, 0x35},
	{ 2, 12, 8, 16, 0x31},
	{ 2, 12, 8, 16, 0x31},
	{ 2, 11, 8,  8, 0x21} };
	{ 2, 11, 8,  8, 0x21} };


unsigned short XGINew_DDRDRAM_TYPE20[12][5] = {
static unsigned short XGINew_DDRDRAM_TYPE20[12][5] = {
	{ 2, 14, 11, 128, 0x5D},
	{ 2, 14, 11, 128, 0x5D},
	{ 2, 14, 10, 64, 0x59},
	{ 2, 14, 10, 64, 0x59},
	{ 2, 13, 11, 64, 0x4D},
	{ 2, 13, 11, 64, 0x4D},
@@ -89,8 +89,10 @@ void XGINew_CheckBusWidth_310(struct vb_device_info *) ;
int      XGINew_SDRSizing(struct vb_device_info *);
int      XGINew_SDRSizing(struct vb_device_info *);
int      XGINew_DDRSizing(struct vb_device_info *);
int      XGINew_DDRSizing(struct vb_device_info *);
void     XGINew_EnableRefresh(struct xgi_hw_device_info *, struct vb_device_info *);
void     XGINew_EnableRefresh(struct xgi_hw_device_info *, struct vb_device_info *);
int      XGINew_RAMType;                  /*int      ModeIDOffset,StandTable,CRT1Table,ScreenOffset,REFIndex;*/
static int      XGINew_RAMType;		/*int      ModeIDOffset,StandTable,CRT1Table,ScreenOffset,REFIndex;*/
unsigned long	 UNIROM;			  /* UNIROM */
#if 0
static unsigned long	 UNIROM;
#endif
unsigned char  ChkLFB(struct vb_device_info *);
unsigned char  ChkLFB(struct vb_device_info *);
void     XGINew_Delay15us(unsigned long);
void     XGINew_Delay15us(unsigned long);
void     SetPowerConsume(struct xgi_hw_device_info *HwDeviceExtension,
void     SetPowerConsume(struct xgi_hw_device_info *HwDeviceExtension,
@@ -106,7 +108,7 @@ unsigned char GetXG21FPBits(struct vb_device_info *pVBInfo);
void     XGINew_GetXG27Sense(struct xgi_hw_device_info *HwDeviceExtension, struct vb_device_info *pVBInfo) ;
void     XGINew_GetXG27Sense(struct xgi_hw_device_info *HwDeviceExtension, struct vb_device_info *pVBInfo) ;
unsigned char    GetXG27FPBits(struct vb_device_info *pVBInfo);
unsigned char    GetXG27FPBits(struct vb_device_info *pVBInfo);


void DelayUS(unsigned long MicroSeconds)
static void DelayUS(unsigned long MicroSeconds)
{
{
	udelay(MicroSeconds);
	udelay(MicroSeconds);
}
}
@@ -148,7 +150,7 @@ unsigned char XGIInitNew(struct xgi_hw_device_info *HwDeviceExtension)
   /* if ( pVBInfo->ROMAddr == 0 ) */
   /* if ( pVBInfo->ROMAddr == 0 ) */
   /* return( 0 ) ; */
   /* return( 0 ) ; */


    if (pVBInfo->FBAddr == 0) {
    if (pVBInfo->FBAddr == NULL) {
       printk("\n pVBInfo->FBAddr == 0 ");
       printk("\n pVBInfo->FBAddr == 0 ");
       return 0;
       return 0;
    }
    }
@@ -617,7 +619,7 @@ unsigned char XGINew_GetXG20DRAMType(struct xgi_hw_device_info *HwDeviceExtensio
/* Output : */
/* Output : */
/* Description : */
/* Description : */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
unsigned char XGINew_Get310DRAMType(struct vb_device_info *pVBInfo)
static unsigned char XGINew_Get310DRAMType(struct vb_device_info *pVBInfo)
{
{
    unsigned char data ;
    unsigned char data ;


@@ -653,7 +655,7 @@ void XGINew_Delay15us(unsigned long ulMicrsoSec)
/* Output : */
/* Output : */
/* Description : */
/* Description : */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
void XGINew_SDR_MRS(struct vb_device_info *pVBInfo)
static void XGINew_SDR_MRS(struct vb_device_info *pVBInfo)
{
{
    unsigned short data ;
    unsigned short data ;


@@ -673,7 +675,7 @@ void XGINew_SDR_MRS(struct vb_device_info *pVBInfo)
/* Output : */
/* Output : */
/* Description : */
/* Description : */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
void XGINew_DDR1x_MRS_340(unsigned long P3c4, struct vb_device_info *pVBInfo)
static void XGINew_DDR1x_MRS_340(unsigned long P3c4, struct vb_device_info *pVBInfo)
{
{
    XGINew_SetReg1( P3c4 , 0x18 , 0x01 ) ;
    XGINew_SetReg1( P3c4 , 0x18 , 0x01 ) ;
    XGINew_SetReg1( P3c4 , 0x19 , 0x20 ) ;
    XGINew_SetReg1( P3c4 , 0x19 , 0x20 ) ;
@@ -711,7 +713,8 @@ void XGINew_DDR1x_MRS_340(unsigned long P3c4, struct vb_device_info *pVBInfo)
/* Output : */
/* Output : */
/* Description : */
/* Description : */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
void XGINew_DDR2x_MRS_340(unsigned long P3c4, struct vb_device_info *pVBInfo)
static void XGINew_DDR2x_MRS_340(unsigned long P3c4,
				 struct vb_device_info *pVBInfo)
{
{
    XGINew_SetReg1( P3c4 , 0x18 , 0x00 ) ;
    XGINew_SetReg1( P3c4 , 0x18 , 0x00 ) ;
    XGINew_SetReg1( P3c4 , 0x19 , 0x20 ) ;
    XGINew_SetReg1( P3c4 , 0x19 , 0x20 ) ;
@@ -740,8 +743,10 @@ void XGINew_DDR2x_MRS_340(unsigned long P3c4, struct vb_device_info *pVBInfo)
/* Output : */
/* Output : */
/* Description : */
/* Description : */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
void XGINew_DDRII_Bootup_XG27(struct xgi_hw_device_info *HwDeviceExtension,
static void XGINew_DDRII_Bootup_XG27(
			      unsigned long P3c4, struct vb_device_info *pVBInfo)
				struct xgi_hw_device_info *HwDeviceExtension,
				unsigned long P3c4,
				struct vb_device_info *pVBInfo)
{
{
    unsigned long P3d4 = P3c4 + 0x10 ;
    unsigned long P3d4 = P3c4 + 0x10 ;
    XGINew_RAMType = ( int )XGINew_GetXG20DRAMType( HwDeviceExtension , pVBInfo ) ;
    XGINew_RAMType = ( int )XGINew_GetXG20DRAMType( HwDeviceExtension , pVBInfo ) ;
@@ -819,7 +824,7 @@ void XGINew_DDRII_Bootup_XG27(struct xgi_hw_device_info *HwDeviceExtension,
/* Output : */
/* Output : */
/* Description : */
/* Description : */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
void XGINew_DDR2_MRS_XG20(struct xgi_hw_device_info *HwDeviceExtension,
static void XGINew_DDR2_MRS_XG20(struct xgi_hw_device_info *HwDeviceExtension,
			  unsigned long P3c4, struct vb_device_info *pVBInfo)
			  unsigned long P3c4, struct vb_device_info *pVBInfo)
{
{
    unsigned long P3d4 = P3c4 + 0x10 ;
    unsigned long P3d4 = P3c4 + 0x10 ;
@@ -866,13 +871,14 @@ void XGINew_DDR2_MRS_XG20(struct xgi_hw_device_info *HwDeviceExtension,
    DelayUS( 200 ) ;
    DelayUS( 200 ) ;
}
}


#if 0
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
/* Function : XGINew_DDR2_MRS_XG20 */
/* Function : XGINew_DDR2_MRS_XG20 */
/* Input : */
/* Input : */
/* Output : */
/* Output : */
/* Description : */
/* Description : */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
void XGINew_DDR2_MRS_XG27(struct xgi_hw_device_info *HwDeviceExtension,
static void XGINew_DDR2_MRS_XG27(struct xgi_hw_device_info *HwDeviceExtension,
			  unsigned long P3c4, struct vb_device_info *pVBInfo)
			  unsigned long P3c4, struct vb_device_info *pVBInfo)
{
{
    unsigned long P3d4 = P3c4 + 0x10 ;
    unsigned long P3d4 = P3c4 + 0x10 ;
@@ -944,6 +950,7 @@ void XGINew_DDR2_MRS_XG27(struct xgi_hw_device_info *HwDeviceExtension,
    XGINew_SetReg1( P3c4 , 0x1B , 0x03 ) ;			/* SR1B */
    XGINew_SetReg1( P3c4 , 0x1B , 0x03 ) ;			/* SR1B */


}
}
#endif


/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
/* Function : XGINew_DDR1x_DefaultRegister */
/* Function : XGINew_DDR1x_DefaultRegister */
@@ -951,8 +958,10 @@ void XGINew_DDR2_MRS_XG27(struct xgi_hw_device_info *HwDeviceExtension,
/* Output : */
/* Output : */
/* Description : */
/* Description : */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
void XGINew_DDR1x_DefaultRegister(struct xgi_hw_device_info *HwDeviceExtension,
static void XGINew_DDR1x_DefaultRegister(
				  unsigned long Port, struct vb_device_info *pVBInfo)
				struct xgi_hw_device_info *HwDeviceExtension,
				unsigned long Port,
				struct vb_device_info *pVBInfo)
{
{
    unsigned long P3d4 = Port ,
    unsigned long P3d4 = Port ,
           P3c4 = Port - 0x10 ;
           P3c4 = Port - 0x10 ;
@@ -1005,15 +1014,17 @@ void XGINew_DDR1x_DefaultRegister(struct xgi_hw_device_info *HwDeviceExtension,
    }
    }
}
}



#if 0
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
/* Function : XGINew_DDR2x_DefaultRegister */
/* Function : XGINew_DDR2x_DefaultRegister */
/* Input : */
/* Input : */
/* Output : */
/* Output : */
/* Description : */
/* Description : */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
void XGINew_DDR2x_DefaultRegister(struct xgi_hw_device_info *HwDeviceExtension,
static void XGINew_DDR2x_DefaultRegister(
				  unsigned long Port, struct vb_device_info *pVBInfo)
				struct xgi_hw_device_info *HwDeviceExtension,
				unsigned long Port,
				struct vb_device_info *pVBInfo)
{
{
    unsigned long P3d4 = Port ,
    unsigned long P3d4 = Port ,
           P3c4 = Port - 0x10 ;
           P3c4 = Port - 0x10 ;
@@ -1056,7 +1067,7 @@ void XGINew_DDR2x_DefaultRegister(struct xgi_hw_device_info *HwDeviceExtension,


    XGINew_DDR2x_MRS_340( P3c4 , pVBInfo ) ;
    XGINew_DDR2x_MRS_340( P3c4 , pVBInfo ) ;
}
}

#endif


/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
/* Function : XGINew_DDR2_DefaultRegister */
/* Function : XGINew_DDR2_DefaultRegister */
@@ -1064,8 +1075,10 @@ void XGINew_DDR2x_DefaultRegister(struct xgi_hw_device_info *HwDeviceExtension,
/* Output : */
/* Output : */
/* Description : */
/* Description : */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
void XGINew_DDR2_DefaultRegister(struct xgi_hw_device_info *HwDeviceExtension,
static void XGINew_DDR2_DefaultRegister(
				 unsigned long Port, struct vb_device_info *pVBInfo)
				struct xgi_hw_device_info *HwDeviceExtension,
				unsigned long Port,
				struct vb_device_info *pVBInfo)
{
{
    unsigned long P3d4 = Port ,
    unsigned long P3d4 = Port ,
           P3c4 = Port - 0x10 ;
           P3c4 = Port - 0x10 ;
@@ -1247,7 +1260,7 @@ void XGINew_SetDRAMDefaultRegister340(struct xgi_hw_device_info *HwDeviceExtensi
/* Output : */
/* Output : */
/* Description : */
/* Description : */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
void XGINew_DDR_MRS(struct vb_device_info *pVBInfo)
static void XGINew_DDR_MRS(struct vb_device_info *pVBInfo)
{
{
    unsigned short data ;
    unsigned short data ;


@@ -1315,7 +1328,8 @@ void XGINew_DDR_MRS(struct vb_device_info *pVBInfo)
/* Output : */
/* Output : */
/* Description : */
/* Description : */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
void XGINew_VerifyMclk(struct xgi_hw_device_info *HwDeviceExtension, struct vb_device_info *pVBInfo)
static void XGINew_VerifyMclk(struct xgi_hw_device_info *HwDeviceExtension,
			      struct vb_device_info *pVBInfo)
{
{
    unsigned char *pVideoMemory = pVBInfo->FBAddr ;
    unsigned char *pVideoMemory = pVBInfo->FBAddr ;
    unsigned char i, j ;
    unsigned char i, j ;
@@ -1561,7 +1575,7 @@ void XGINew_EnableRefresh(struct xgi_hw_device_info *HwDeviceExtension, struct v
/* Output : */
/* Output : */
/* Description : */
/* Description : */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
void XGINew_DisableChannelInterleaving(int index,
static void XGINew_DisableChannelInterleaving(int index,
				       unsigned short XGINew_DDRDRAM_TYPE[][5],
				       unsigned short XGINew_DDRDRAM_TYPE[][5],
				       struct vb_device_info *pVBInfo)
				       struct vb_device_info *pVBInfo)
{
{
@@ -1597,7 +1611,7 @@ void XGINew_DisableChannelInterleaving(int index,
/* Output : */
/* Output : */
/* Description : */
/* Description : */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
void XGINew_SetDRAMSizingType(int index,
static void XGINew_SetDRAMSizingType(int index,
			      unsigned short DRAMTYPE_TABLE[][5],
			      unsigned short DRAMTYPE_TABLE[][5],
			      struct vb_device_info *pVBInfo)
			      struct vb_device_info *pVBInfo)
{
{
@@ -1750,7 +1764,7 @@ void XGINew_CheckBusWidth_310(struct vb_device_info *pVBInfo)
/* Output : */
/* Output : */
/* Description : */
/* Description : */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
int XGINew_SetRank(int index,
static int XGINew_SetRank(int index,
		   unsigned char RankNo,
		   unsigned char RankNo,
		   unsigned char XGINew_ChannelAB,
		   unsigned char XGINew_ChannelAB,
		   unsigned short DRAMTYPE_TABLE[][5],
		   unsigned short DRAMTYPE_TABLE[][5],
@@ -1791,7 +1805,7 @@ int XGINew_SetRank(int index,
/* Output : */
/* Output : */
/* Description : */
/* Description : */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
int XGINew_SetDDRChannel(int index,
static int XGINew_SetDDRChannel(int index,
			 unsigned char ChannelNo,
			 unsigned char ChannelNo,
			 unsigned char XGINew_ChannelAB,
			 unsigned char XGINew_ChannelAB,
			 unsigned short DRAMTYPE_TABLE[][5],
			 unsigned short DRAMTYPE_TABLE[][5],
@@ -1831,7 +1845,7 @@ int XGINew_SetDDRChannel(int index,
/* Output : */
/* Output : */
/* Description : */
/* Description : */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
int XGINew_CheckColumn(int index,
static int XGINew_CheckColumn(int index,
		       unsigned short DRAMTYPE_TABLE[][5],
		       unsigned short DRAMTYPE_TABLE[][5],
		       struct vb_device_info *pVBInfo)
		       struct vb_device_info *pVBInfo)
{
{
@@ -1865,7 +1879,7 @@ int XGINew_CheckColumn(int index,
/* Output : */
/* Output : */
/* Description : */
/* Description : */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
int XGINew_CheckBanks(int index,
static int XGINew_CheckBanks(int index,
		      unsigned short DRAMTYPE_TABLE[][5],
		      unsigned short DRAMTYPE_TABLE[][5],
		      struct vb_device_info *pVBInfo)
		      struct vb_device_info *pVBInfo)
{
{
@@ -1898,7 +1912,7 @@ int XGINew_CheckBanks(int index,
/* Output : */
/* Output : */
/* Description : */
/* Description : */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
int XGINew_CheckRank(int RankNo, int index,
static int XGINew_CheckRank(int RankNo, int index,
		     unsigned short DRAMTYPE_TABLE[][5],
		     unsigned short DRAMTYPE_TABLE[][5],
		     struct vb_device_info *pVBInfo)
		     struct vb_device_info *pVBInfo)
{
{
@@ -1934,7 +1948,7 @@ int XGINew_CheckRank(int RankNo, int index,
/* Output : */
/* Output : */
/* Description : */
/* Description : */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
int XGINew_CheckDDRRank(int RankNo, int index,
static int XGINew_CheckDDRRank(int RankNo, int index,
			unsigned short DRAMTYPE_TABLE[][5],
			unsigned short DRAMTYPE_TABLE[][5],
			struct vb_device_info *pVBInfo)
			struct vb_device_info *pVBInfo)
{
{
@@ -1978,7 +1992,7 @@ int XGINew_CheckDDRRank(int RankNo, int index,
/* Output : */
/* Output : */
/* Description : */
/* Description : */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
int XGINew_CheckRanks(int RankNo, int index,
static int XGINew_CheckRanks(int RankNo, int index,
		      unsigned short DRAMTYPE_TABLE[][5],
		      unsigned short DRAMTYPE_TABLE[][5],
		      struct vb_device_info *pVBInfo)
		      struct vb_device_info *pVBInfo)
{
{
@@ -2006,7 +2020,7 @@ int XGINew_CheckRanks(int RankNo, int index,
/* Output : */
/* Output : */
/* Description : */
/* Description : */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
int XGINew_CheckDDRRanks(int RankNo, int index,
static int XGINew_CheckDDRRanks(int RankNo, int index,
			 unsigned short DRAMTYPE_TABLE[][5],
			 unsigned short DRAMTYPE_TABLE[][5],
			 struct vb_device_info *pVBInfo)
			 struct vb_device_info *pVBInfo)
{
{
@@ -2065,7 +2079,7 @@ int XGINew_SDRSizing(struct vb_device_info *pVBInfo)
/* Output : */
/* Output : */
/* Description : */
/* Description : */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
unsigned short XGINew_SetDRAMSizeReg(int index,
static unsigned short XGINew_SetDRAMSizeReg(int index,
				     unsigned short DRAMTYPE_TABLE[][5],
				     unsigned short DRAMTYPE_TABLE[][5],
				     struct vb_device_info *pVBInfo)
				     struct vb_device_info *pVBInfo)
{
{
@@ -2116,7 +2130,7 @@ unsigned short XGINew_SetDRAMSizeReg(int index,
/* Output : */
/* Output : */
/* Description : */
/* Description : */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
unsigned short XGINew_SetDRAMSize20Reg(int index,
static unsigned short XGINew_SetDRAMSize20Reg(int index,
				       unsigned short DRAMTYPE_TABLE[][5],
				       unsigned short DRAMTYPE_TABLE[][5],
				       struct vb_device_info *pVBInfo)
				       struct vb_device_info *pVBInfo)
{
{
@@ -2168,7 +2182,8 @@ unsigned short XGINew_SetDRAMSize20Reg(int index,
/* Output : */
/* Output : */
/* Description : */
/* Description : */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
int XGINew_ReadWriteRest(unsigned short StopAddr, unsigned short StartAddr,
static int XGINew_ReadWriteRest(unsigned short StopAddr,
				unsigned short StartAddr,
				struct vb_device_info *pVBInfo)
				struct vb_device_info *pVBInfo)
{
{
    int i ;
    int i ;
@@ -2205,7 +2220,7 @@ int XGINew_ReadWriteRest(unsigned short StopAddr, unsigned short StartAddr,
/* Output : */
/* Output : */
/* Description : */
/* Description : */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
unsigned char XGINew_CheckFrequence(struct vb_device_info *pVBInfo)
static unsigned char XGINew_CheckFrequence(struct vb_device_info *pVBInfo)
{
{
    unsigned char data ;
    unsigned char data ;


@@ -2228,7 +2243,8 @@ unsigned char XGINew_CheckFrequence(struct vb_device_info *pVBInfo)
/* Output : */
/* Output : */
/* Description : */
/* Description : */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
void XGINew_CheckChannel(struct xgi_hw_device_info *HwDeviceExtension, struct vb_device_info *pVBInfo)
static void XGINew_CheckChannel(struct xgi_hw_device_info *HwDeviceExtension,
				struct vb_device_info *pVBInfo)
{
{
    unsigned char data;
    unsigned char data;


@@ -2672,8 +2688,9 @@ void SetPowerConsume(struct xgi_hw_device_info *HwDeviceExtension,
    }
    }
}
}



#if 0
void XGINew_InitVBIOSData(struct xgi_hw_device_info *HwDeviceExtension, struct vb_device_info *pVBInfo)
static void XGINew_InitVBIOSData(struct xgi_hw_device_info *HwDeviceExtension,
				 struct vb_device_info *pVBInfo)
{
{


	/* unsigned long ROMAddr = (unsigned long)HwDeviceExtension->pjVirtualRomBase; */
	/* unsigned long ROMAddr = (unsigned long)HwDeviceExtension->pjVirtualRomBase; */
@@ -2715,6 +2732,7 @@ void XGINew_InitVBIOSData(struct xgi_hw_device_info *HwDeviceExtension, struct v
	}
	}


}
}
#endif


/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
/* Function : ReadVBIOSTablData */
/* Function : ReadVBIOSTablData */
Loading