[PATCH driver/ast 05/15] Clean up namespace in ast_vgatools.c
Egbert Eich
eich at freedesktop.org
Thu Apr 24 10:36:53 PDT 2014
From: Egbert Eich <eich at suse.de>
- Make local functions static
This sometimes helps the compiler to optimize.
- Make sure exported functions have 'AST' in their name.
This avoids name space conflicts with the server or other drivers.
- Place declaration of exported functions in a header file.
This ensures that changes to the function type or arguments are followed
thru everywhere.
Signed-off-by: Egbert Eich <eich at suse.de>
---
src/ast.h | 24 ++++++++++
src/ast_driver.c | 72 ++++++++++-------------------
src/ast_mode.c | 10 +---
src/ast_vgatool.c | 136 +++++++++++++++++++++++-------------------------------
4 files changed, 107 insertions(+), 135 deletions(-)
diff --git a/src/ast.h b/src/ast.h
index 3b56a6c..75a1a98 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -305,6 +305,30 @@ typedef struct _ASTRec {
#define ASTPTR(p) ((ASTRecPtr)((p)->driverPrivate))
+/* ast_vgatool.c */
+extern Bool bASTIsVGAEnabled(ScrnInfoPtr pScrn);
+extern Bool ASTGetVGA2EDID(ScrnInfoPtr pScrn, unsigned char *pEDIDBuffer);
+extern void ASTDisplayPowerManagementSet(ScrnInfoPtr pScrn, int PowerManagementMode, int flags);
+extern void vASTLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO *colors, VisualPtr pVisual);
+extern void ASTBlankScreen(ScrnInfoPtr pScreen, Bool unblack);
+extern void vAST1000DisplayOn(ScrnInfoPtr pScrn);
+extern void vAST1000DisplayOff(ScrnInfoPtr pScrn);
+extern void vASTSetStartAddressCRT1(ASTRecPtr pAST, ULONG base);
+extern void ASTGetScratchOptions(ScrnInfoPtr pScrn);
+void ASTGetChipType(ScrnInfoPtr pScrn);
+ULONG ASTGetMaxDCLK(ScrnInfoPtr pScrn);
+ULONG ASTGetVRAMInfo(ScrnInfoPtr pScrn);
+void ASTGetDRAMInfo(ScrnInfoPtr pScrn);
+Bool bASTRegInit(ScrnInfoPtr pScrn);
+void vASTOpenKey(ScrnInfoPtr pScrn);
+Bool ASTReadEDID_M68K(ScrnInfoPtr pScrn, BYTE *pEDIDData);
+UCHAR ASTGetLinkMaxCLK(ScrnInfoPtr pScrn);
+Bool ASTGetVGAEDID(ScrnInfoPtr pScrn, unsigned char *pEDIDBuffer);
+Bool bASTInitAST1180(ScrnInfoPtr pScrn);
+void ASTGetAST1180DRAMInfo(ScrnInfoPtr pScrn);
+void vASTEnableVGAMMIO(ScrnInfoPtr pScrn);
+Bool ASTInitVGA(ScrnInfoPtr pScrn, ULONG Flags);
+
/* Include Files */
#include "ast_mode.h"
#include "ast_vgatool.h"
diff --git a/src/ast_driver.c b/src/ast_driver.c
index b04b026..a35d0ba 100644
--- a/src/ast_driver.c
+++ b/src/ast_driver.c
@@ -63,29 +63,7 @@ extern Bool ASTUnmapMem(ScrnInfoPtr pScrn);
extern Bool ASTMapMMIO(ScrnInfoPtr pScrn);
extern void ASTUnmapMMIO(ScrnInfoPtr pScrn);
-extern void vASTOpenKey(ScrnInfoPtr pScrn);
-extern Bool bASTRegInit(ScrnInfoPtr pScrn);
-extern void GetDRAMInfo(ScrnInfoPtr pScrn);
-extern ULONG GetVRAMInfo(ScrnInfoPtr pScrn);
-extern ULONG GetMaxDCLK(ScrnInfoPtr pScrn);
-extern void GetChipType(ScrnInfoPtr pScrn);
-extern void GetScratchOptions(ScrnInfoPtr pScrn);
-extern void vASTLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO *colors, VisualPtr pVisual);
-extern void ASTDisplayPowerManagementSet(ScrnInfoPtr pScrn, int PowerManagementMode, int flags);
-extern void vSetStartAddressCRT1(ASTRecPtr pAST, ULONG base);
extern Bool ASTSetMode(ScrnInfoPtr pScrn, DisplayModePtr mode);
-extern Bool GetVGA2EDID(ScrnInfoPtr pScrn, unsigned char *pEDIDBuffer);
-extern void vInitDRAMReg(ScrnInfoPtr pScrn);
-extern Bool bIsVGAEnabled(ScrnInfoPtr pScrn);
-extern void ASTBlankScreen(ScrnInfoPtr pScreen, Bool unblack);
-extern Bool InitVGA(ScrnInfoPtr pScrn, ULONG Flags);
-extern Bool GetVGAEDID(ScrnInfoPtr pScrn, unsigned char *pEDIDBuffer);
-extern Bool bInitAST1180(ScrnInfoPtr pScrn);
-extern void GetAST1180DRAMInfo(ScrnInfoPtr pScrn);
-extern void vEnableASTVGAMMIO(ScrnInfoPtr pScrn);
-
-extern Bool ReadEDID_M68K(ScrnInfoPtr pScrn, BYTE *pEDIDData);
-extern UCHAR GetLinkMaxCLK(ScrnInfoPtr pScrn);
extern Bool bInitCMDQInfo(ScrnInfoPtr pScrn, ASTRecPtr pAST);
extern Bool bEnableCMDQ(ScrnInfoPtr pScrn, ASTRecPtr pAST);
@@ -645,22 +623,22 @@ ASTPreInit(ScrnInfoPtr pScrn, int flags)
}
/* Init AST1180 */
- bInitAST1180(pScrn);
+ bASTInitAST1180(pScrn);
/* Get AST1180 Information */
- GetAST1180DRAMInfo(pScrn);
+ ASTGetAST1180DRAMInfo(pScrn);
pScrn->videoRam = pAST->ulVRAMSize / 1024;
}
else
{
/* Enable VGA MMIO Access */
- vEnableASTVGAMMIO(pScrn);
+ vASTEnableVGAMMIO(pScrn);
/* Init VGA Adapter */
if (!xf86IsPrimaryPci(pAST->PciInfo))
{
- InitVGA(pScrn, 0);
+ ASTInitVGA(pScrn, 0);
}
vASTOpenKey(pScrn);
@@ -672,16 +650,16 @@ ASTPreInit(ScrnInfoPtr pScrn, int flags)
else if (PCI_DEV_REVISION(pAST->PciInfo) >= 0x20)
pAST->jChipType = AST2300;
else if (PCI_DEV_REVISION(pAST->PciInfo) >= 0x10)
- GetChipType(pScrn);
+ ASTGetChipType(pScrn);
else
pAST->jChipType = AST2000;
/* Get Options from Scratch */
- GetScratchOptions(pScrn);
+ ASTGetScratchOptions(pScrn);
/* Get DRAM Info */
- GetDRAMInfo(pScrn);
- pAST->ulVRAMSize = GetVRAMInfo(pScrn);
+ ASTGetDRAMInfo(pScrn);
+ pAST->ulVRAMSize = ASTGetVRAMInfo(pScrn);
pScrn->videoRam = pAST->ulVRAMSize / 1024;
}
@@ -713,7 +691,7 @@ ASTPreInit(ScrnInfoPtr pScrn, int flags)
clockRanges = xnfcalloc(sizeof(ClockRange), 1);
clockRanges->next = NULL;
clockRanges->minClock = 9500;
- clockRanges->maxClock = GetMaxDCLK(pScrn) * 1000;
+ clockRanges->maxClock = ASTGetMaxDCLK(pScrn) * 1000;
clockRanges->clockIndex = -1;
clockRanges->interlaceAllowed = FALSE;
clockRanges->doubleScanAllowed = FALSE;
@@ -1104,7 +1082,7 @@ ASTAdjustFrame(ADJUST_FRAME_ARGS_DECL)
base = y * pAST->VideoModeInfo.ScreenPitch + x * ((pAST->VideoModeInfo.bitsPerPixel + 1) / 8);
/* base = base >> 2; */ /* DW unit */
- vSetStartAddressCRT1(pAST, base);
+ vASTSetStartAddressCRT1(pAST, base);
}
@@ -1116,14 +1094,14 @@ ASTEnterVT(VT_FUNC_ARGS_DECL)
ASTRecPtr pAST = ASTPTR(pScrn);
/* Fixed suspend can't resume issue */
- if (!bIsVGAEnabled(pScrn))
+ if (!bASTIsVGAEnabled(pScrn))
{
if (pAST->jChipType == AST1180)
- bInitAST1180(pScrn);
+ bASTInitAST1180(pScrn);
else
{
- vEnableASTVGAMMIO(pScrn);
- InitVGA(pScrn, 1);
+ vASTEnableVGAMMIO(pScrn);
+ ASTInitVGA(pScrn, 1);
}
ASTRestore(pScrn);
}
@@ -1561,15 +1539,15 @@ ASTProbeDDC(ScrnInfoPtr pScrn, int index)
if (xf86LoadSubModule(pScrn, "ddc"))
{
if (pAST->jChipType == AST1180)
- Flags = GetVGA2EDID(pScrn, DDC_data);
+ Flags = ASTGetVGA2EDID(pScrn, DDC_data);
else if (pAST->jTxChipType == Tx_DP501)
{
- Flags = ReadEDID_M68K(pScrn, DDC_data);
+ Flags = ASTReadEDID_M68K(pScrn, DDC_data);
if (Flags == FALSE)
- Flags = GetVGAEDID(pScrn, DDC_data);
+ Flags = ASTGetVGAEDID(pScrn, DDC_data);
}
else
- Flags = GetVGAEDID(pScrn, DDC_data);
+ Flags = ASTGetVGAEDID(pScrn, DDC_data);
if (Flags)
{
@@ -1611,17 +1589,17 @@ ASTDoDDC(ScrnInfoPtr pScrn, int index)
if (xf86LoadSubModule(pScrn, "ddc"))
{
if (pAST->jChipType == AST1180)
- Flags = GetVGA2EDID(pScrn, DDC_data);
+ Flags = ASTGetVGA2EDID(pScrn, DDC_data);
else if (pAST->jTxChipType == Tx_DP501)
{
pAST->DP501_MaxVCLK = 0xFF;
- Flags = ReadEDID_M68K(pScrn, DDC_data);
- if (Flags) pAST->DP501_MaxVCLK = GetLinkMaxCLK(pScrn);
+ Flags = ASTReadEDID_M68K(pScrn, DDC_data);
+ if (Flags) pAST->DP501_MaxVCLK = ASTGetLinkMaxCLK(pScrn);
else
- Flags = GetVGAEDID(pScrn, DDC_data);
+ Flags = ASTGetVGAEDID(pScrn, DDC_data);
}
else
- Flags = GetVGAEDID(pScrn, DDC_data);
+ Flags = ASTGetVGAEDID(pScrn, DDC_data);
if (Flags)
{
@@ -1637,7 +1615,7 @@ ASTDoDDC(ScrnInfoPtr pScrn, int index)
/* For VGA2 CLONE Support, ycchen at 012508 */
if ((xf86ReturnOptValBool(pAST->Options, OPTION_VGA2_CLONE, FALSE)) || pAST->VGA2Clone) {
- if (GetVGA2EDID(pScrn, DDC_data) == TRUE) {
+ if (ASTGetVGA2EDID(pScrn, DDC_data) == TRUE) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Get VGA2 EDID Correctly!! \n");
MonInfo2 = xf86InterpretEDID(pScrn->scrnIndex, DDC_data);
if (MonInfo1 == NULL) /* No DDC1 EDID */
@@ -1769,7 +1747,7 @@ ASTDoDDC(ScrnInfoPtr pScrn, int index)
} /* Check with VGA1 & VGA2 EDID */
- } /* GetVGA2EDID */
+ } /* ASTGetVGA2EDID */
else {
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Can't Get VGA2 EDID Correctly!! \n");
}
diff --git a/src/ast_mode.c b/src/ast_mode.c
index 8c3d828..14dcc8c 100644
--- a/src/ast_mode.c
+++ b/src/ast_mode.c
@@ -53,9 +53,6 @@
/* Driver specific headers */
#include "ast.h"
-/* external reference fucntion */
-extern Bool bInitAST1180(ScrnInfoPtr pScrn);
-
VBIOS_STDTABLE_STRUCT StdTable[] = {
/* MD_2_3_400 */
{
@@ -410,11 +407,6 @@ VBIOS_DAC_INFO DAC_VGA[] = {
};
/* extern. function */
-extern void vASTOpenKey(ScrnInfoPtr pScrn);
-extern Bool bASTRegInit(ScrnInfoPtr pScrn);
-extern void vAST1000DisplayOn(ScrnInfoPtr pScrn);
-extern void vAST1000DisplayOff(ScrnInfoPtr pScrn);
-
extern Bool bEnable2D(ScrnInfoPtr pScrn, ASTRecPtr pAST);
extern void vDisable2D(ScrnInfoPtr pScrn, ASTRecPtr pAST);
@@ -450,7 +442,7 @@ ASTSetMode(ScrnInfoPtr pScrn, DisplayModePtr mode)
/* set mode */
if (pAST->jChipType == AST1180)
{
- bInitAST1180(pScrn);
+ bASTInitAST1180(pScrn);
bSetAST1180CRTCReg(pScrn, mode, &vgamodeinfo);
bSetAST1180OffsetReg(pScrn, mode, &vgamodeinfo);
diff --git a/src/ast_vgatool.c b/src/ast_vgatool.c
index af96048..b42ac7a 100644
--- a/src/ast_vgatool.c
+++ b/src/ast_vgatool.c
@@ -83,28 +83,6 @@ __inline void MOutdwm(UCHAR *mmiobase, ULONG r, ULONG v)
*(volatile ULONG *) (mmiobase + 0x10000 + (r & 0x0000FFFF)) = v;
}
-/* Prototype type declaration*/
-void vASTOpenKey(ScrnInfoPtr pScrn);
-Bool bASTRegInit(ScrnInfoPtr pScrn);
-void GetDRAMInfo(ScrnInfoPtr pScrn);
-ULONG GetVRAMInfo(ScrnInfoPtr pScrn);
-ULONG GetMaxDCLK(ScrnInfoPtr pScrn);
-void GetChipType(ScrnInfoPtr pScrn);
-void GetScratchOptions(ScrnInfoPtr pScrn);
-void vAST1000DisplayOn(ScrnInfoPtr pScrn);
-void vAST1000DisplayOff(ScrnInfoPtr pScrn);
-void ASTBlankScreen(ScrnInfoPtr pScrn, Bool unblack);
-void vSetStartAddressCRT1(ASTRecPtr pAST, ULONG base);
-void vASTLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO *colors, VisualPtr pVisual);
-void ASTDisplayPowerManagementSet(ScrnInfoPtr pScrn, int PowerManagementMode, int flags);
-Bool GetVGA2EDID(ScrnInfoPtr pScrn, unsigned char *pEDIDBuffer);
-void vInitDRAMReg(ScrnInfoPtr pScrn);
-Bool bIsVGAEnabled(ScrnInfoPtr pScrn);
-Bool InitVGA(ScrnInfoPtr pScrn, ULONG Flags);
-Bool GetVGAEDID(ScrnInfoPtr pScrn, unsigned char *pEDIDBuffer);
-Bool bInitAST1180(ScrnInfoPtr pScrn);
-void GetAST1180DRAMInfo(ScrnInfoPtr pScrn);
-
/*
* BMCI2C
*/
@@ -3641,7 +3619,7 @@ static BOOL LaunchM68K(ScrnInfoPtr pScrn)
/*
* DP501 external
*/
-Bool ReadEDID_M68K(ScrnInfoPtr pScrn, BYTE *pEDIDData)
+Bool ASTReadEDID_M68K(ScrnInfoPtr pScrn, BYTE *pEDIDData)
{
ASTRecPtr pAST = ASTPTR(pScrn);
UCHAR *mmiobase;
@@ -3674,7 +3652,7 @@ Bool ReadEDID_M68K(ScrnInfoPtr pScrn, BYTE *pEDIDData)
return TRUE;
} /* ReadEDID_M68K */
-UCHAR GetLinkMaxCLK(ScrnInfoPtr pScrn)
+UCHAR ASTGetLinkMaxCLK(ScrnInfoPtr pScrn)
{
ASTRecPtr pAST = ASTPTR(pScrn);
UCHAR *mmiobase;
@@ -3705,7 +3683,7 @@ UCHAR GetLinkMaxCLK(ScrnInfoPtr pScrn)
return MaxClk;
-} /* GetLinkMaxCLK */
+} /* ASTGetLinkMaxCLK */
/*
* VGA Modules
@@ -3737,7 +3715,7 @@ bASTRegInit(ScrnInfoPtr pScrn)
}
void
-GetDRAMInfo(ScrnInfoPtr pScrn)
+ASTGetDRAMInfo(ScrnInfoPtr pScrn)
{
ASTRecPtr pAST = ASTPTR(pScrn);
ULONG ulRefPLL, ulDeNumerator, ulNumerator, ulDivider;
@@ -3827,10 +3805,10 @@ GetDRAMInfo(ScrnInfoPtr pScrn)
}
pAST->ulMCLK = ulRefPLL * (ulNumerator + 2) / ((ulDeNumerator + 2) * ulDivider * 1000);
-} /* GetDRAMInfo */
+} /* ASTGetDRAMInfo */
ULONG
-GetVRAMInfo(ScrnInfoPtr pScrn)
+ASTGetVRAMInfo(ScrnInfoPtr pScrn)
{
ASTRecPtr pAST = ASTPTR(pScrn);
ULONG ulVRAMSize;
@@ -3876,7 +3854,7 @@ GetVRAMInfo(ScrnInfoPtr pScrn)
}
ULONG
-GetMaxDCLK(ScrnInfoPtr pScrn)
+ASTGetMaxDCLK(ScrnInfoPtr pScrn)
{
ASTRecPtr pAST = ASTPTR(pScrn);
UCHAR jReg;
@@ -3933,7 +3911,7 @@ GetMaxDCLK(ScrnInfoPtr pScrn)
}
void
-GetChipType(ScrnInfoPtr pScrn)
+ASTGetChipType(ScrnInfoPtr pScrn)
{
ASTRecPtr pAST = ASTPTR(pScrn);
ULONG ulData;
@@ -3965,7 +3943,7 @@ GetChipType(ScrnInfoPtr pScrn)
}
void
-GetScratchOptions(ScrnInfoPtr pScrn)
+ASTGetScratchOptions(ScrnInfoPtr pScrn)
{
ASTRecPtr pAST = ASTPTR(pScrn);
ULONG ulData;
@@ -4040,7 +4018,7 @@ GetScratchOptions(ScrnInfoPtr pScrn)
} /* GetScratchOptions */
void
-vSetStartAddressCRT1(ASTRecPtr pAST, ULONG base)
+vASTSetStartAddressCRT1(ASTRecPtr pAST, ULONG base)
{
ULONG addr;
@@ -4251,7 +4229,7 @@ ASTDisplayPowerManagementSet(ScrnInfoPtr pScrn, int PowerManagementMode, int fla
#define I2C_DEVICEADDR_AST1180 0x0A0 /* slave addr */
Bool
-GetVGA2EDID(ScrnInfoPtr pScrn, unsigned char *pEDIDBuffer)
+ASTGetVGA2EDID(ScrnInfoPtr pScrn, unsigned char *pEDIDBuffer)
{
ASTRecPtr pAST = ASTPTR(pScrn);
ULONG i, ulData;
@@ -4351,10 +4329,10 @@ GetVGA2EDID(ScrnInfoPtr pScrn, unsigned char *pEDIDBuffer)
return (TRUE);
-} /* GetVGA2EDID */
+} /* ASTGetVGA2EDID */
/* Init VGA */
-Bool bIsVGAEnabled(ScrnInfoPtr pScrn)
+Bool bASTIsVGAEnabled(ScrnInfoPtr pScrn)
{
ASTRecPtr pAST;
UCHAR ch;
@@ -4385,7 +4363,7 @@ Bool bIsVGAEnabled(ScrnInfoPtr pScrn)
return (0);
}
-void vEnableVGA(ScrnInfoPtr pScrn)
+static void vEnableVGA(ScrnInfoPtr pScrn)
{
ASTRecPtr pAST;
@@ -4396,28 +4374,28 @@ void vEnableVGA(ScrnInfoPtr pScrn)
}
-UCHAR ExtRegInfo[] = {
+static UCHAR ExtRegInfo[] = {
0x0F,
0x04,
0x1C,
0xFF
};
-UCHAR ExtRegInfo_AST2300A0[] = {
+static UCHAR ExtRegInfo_AST2300A0[] = {
0x0F,
0x04,
0x1C,
0xFF
};
-UCHAR ExtRegInfo_AST2300[] = {
+static UCHAR ExtRegInfo_AST2300[] = {
0x0F,
0x04,
0x1F,
0xFF
};
-void vSetDefExtReg(ScrnInfoPtr pScrn)
+static void vSetDefExtReg(ScrnInfoPtr pScrn)
{
ASTRecPtr pAST;
UCHAR i, jIndex, jReg, *pjExtRegInfo;
@@ -4476,7 +4454,7 @@ void vSetDefExtReg(ScrnInfoPtr pScrn)
#define CBR_PATNUM_AST2150 8
-ULONG pattern_AST2150[14] ={
+static ULONG pattern_AST2150[14] ={
0xFF00FF00,
0xCC33CC33,
0xAA55AA55,
@@ -4496,7 +4474,7 @@ typedef struct _AST2150DRAMParam {
UCHAR *pjMMIOVirtualAddress;
} AST2150DRAMParam, *PAST2150DRAMParam;
-ULONG MMCTestBurst2_AST2150(PAST2150DRAMParam param, ULONG datagen)
+static ULONG MMCTestBurst2_AST2150(PAST2150DRAMParam param, ULONG datagen)
{
ULONG data, timeout;
UCHAR *mmiobase;
@@ -4528,7 +4506,7 @@ ULONG MMCTestBurst2_AST2150(PAST2150DRAMParam param, ULONG datagen)
return(data);
}
-ULONG MMCTestSingle2_AST2150(PAST2150DRAMParam param, ULONG datagen)
+static ULONG MMCTestSingle2_AST2150(PAST2150DRAMParam param, ULONG datagen)
{
ULONG data, timeout;
UCHAR *mmiobase;
@@ -4550,7 +4528,7 @@ ULONG MMCTestSingle2_AST2150(PAST2150DRAMParam param, ULONG datagen)
return(data);
}
-int CBRTest_AST2150(PAST2150DRAMParam param)
+static int CBRTest_AST2150(PAST2150DRAMParam param)
{
UCHAR *mmiobase;
@@ -4568,7 +4546,7 @@ int CBRTest_AST2150(PAST2150DRAMParam param)
}
-int CBRScan_AST2150(PAST2150DRAMParam param, int busw)
+static int CBRScan_AST2150(PAST2150DRAMParam param, int busw)
{
ULONG patcnt, loop;
UCHAR *mmiobase;
@@ -4590,7 +4568,7 @@ int CBRScan_AST2150(PAST2150DRAMParam param, int busw)
}
-void CBRDLLI_AST2150(PAST2150DRAMParam param, int busw)
+static void CBRDLLI_AST2150(PAST2150DRAMParam param, int busw)
{
ULONG dllmin[4], dllmax[4], dlli, data, passcnt;
UCHAR *mmiobase;
@@ -4633,7 +4611,7 @@ typedef struct _AST_DRAMStruct {
} AST_DRAMStruct, *PAST_DRAMStruct;
-AST_DRAMStruct AST2000DRAMTableData[] = {
+static AST_DRAMStruct AST2000DRAMTableData[] = {
{ 0x0108, 0x00000000 },
{ 0x0120, 0x00004a21 },
{ 0xFF00, 0x00000043 },
@@ -4661,7 +4639,7 @@ AST_DRAMStruct AST2000DRAMTableData[] = {
{ 0xFFFF, 0xFFFFFFFF }
};
-AST_DRAMStruct AST1100DRAMTableData[] = {
+static AST_DRAMStruct AST1100DRAMTableData[] = {
{ 0x2000, 0x1688a8a8 },
{ 0x2020, 0x000041f0 },
{ 0xFF00, 0x00000043 },
@@ -4714,7 +4692,7 @@ AST_DRAMStruct AST1100DRAMTableData[] = {
{ 0xffff, 0xffffffff },
};
-AST_DRAMStruct AST2100DRAMTableData[] = {
+static AST_DRAMStruct AST2100DRAMTableData[] = {
{ 0x2000, 0x1688a8a8 },
{ 0x2020, 0x00004120 },
{ 0xFF00, 0x00000043 },
@@ -4767,7 +4745,7 @@ AST_DRAMStruct AST2100DRAMTableData[] = {
{ 0xffff, 0xffffffff },
};
-void vInitDRAMReg(ScrnInfoPtr pScrn)
+static void vInitDRAMReg(ScrnInfoPtr pScrn)
{
AST_DRAMStruct *pjDRAMRegInfo;
ASTRecPtr pAST = ASTPTR(pScrn);
@@ -4937,7 +4915,7 @@ ULONG pattern[8] ={
0xF1E843C7,
0x7C61D253};
-int MMCTestBurst(PAST2300DRAMParam param, ULONG datagen)
+static int MMCTestBurst(PAST2300DRAMParam param, ULONG datagen)
{
ULONG data, timeout;
UCHAR *mmiobase;
@@ -4961,7 +4939,7 @@ int MMCTestBurst(PAST2300DRAMParam param, ULONG datagen)
return(1);
}
-int MMCTestBurst2(PAST2300DRAMParam param, ULONG datagen)
+static int MMCTestBurst2(PAST2300DRAMParam param, ULONG datagen)
{
ULONG data, timeout;
UCHAR *mmiobase;
@@ -4984,7 +4962,7 @@ int MMCTestBurst2(PAST2300DRAMParam param, ULONG datagen)
return(data);
}
-int MMCTestSingle(PAST2300DRAMParam param, ULONG datagen)
+static int MMCTestSingle(PAST2300DRAMParam param, ULONG datagen)
{
ULONG data, timeout;
UCHAR *mmiobase;
@@ -5008,7 +4986,7 @@ int MMCTestSingle(PAST2300DRAMParam param, ULONG datagen)
return(1);
}
-int MMCTestSingle2(PAST2300DRAMParam param, ULONG datagen)
+static int MMCTestSingle2(PAST2300DRAMParam param, ULONG datagen)
{
ULONG data, timeout;
UCHAR *mmiobase;
@@ -5031,7 +5009,7 @@ int MMCTestSingle2(PAST2300DRAMParam param, ULONG datagen)
return(data);
}
-int CBRTest(PAST2300DRAMParam param)
+static int CBRTest(PAST2300DRAMParam param)
{
ULONG data;
UCHAR *mmiobase;
@@ -5053,7 +5031,7 @@ int CBRTest(PAST2300DRAMParam param)
return(1);
}
-int CBRScan(PAST2300DRAMParam param)
+static int CBRScan(PAST2300DRAMParam param)
{
ULONG data, data2, patcnt, loop;
UCHAR *mmiobase;
@@ -5079,7 +5057,7 @@ int CBRScan(PAST2300DRAMParam param)
return(data2);
}
-ULONG CBRTest2(PAST2300DRAMParam param)
+static ULONG CBRTest2(PAST2300DRAMParam param)
{
ULONG data;
UCHAR *mmiobase;
@@ -5091,7 +5069,7 @@ ULONG CBRTest2(PAST2300DRAMParam param)
return(~data & 0xffff);
}
-ULONG CBRScan2(PAST2300DRAMParam param)
+static ULONG CBRScan2(PAST2300DRAMParam param)
{
ULONG data, data2, patcnt, loop;
UCHAR *mmiobase;
@@ -5117,14 +5095,14 @@ ULONG CBRScan2(PAST2300DRAMParam param)
return(data2);
}
-ULONG CBRTest3(PAST2300DRAMParam param)
+static ULONG CBRTest3(PAST2300DRAMParam param)
{
if(!MMCTestBurst(param, 0)) return(0);
if(!MMCTestSingle(param, 0)) return(0);
return(1);
}
-ULONG CBRScan3(PAST2300DRAMParam param)
+static ULONG CBRScan3(PAST2300DRAMParam param)
{
ULONG patcnt, loop;
UCHAR *mmiobase;
@@ -5145,7 +5123,7 @@ ULONG CBRScan3(PAST2300DRAMParam param)
return(1);
}
-Bool finetuneDQI_L(PAST2300DRAMParam param)
+static Bool finetuneDQI_L(PAST2300DRAMParam param)
{
ULONG gold_sadj[2], dllmin[16], dllmax[16], dlli, data, cnt, mask, passcnt, retry = 0;
UCHAR *mmiobase;
@@ -5251,7 +5229,7 @@ FINETUNE_DONE:
} /* finetuneDQI_L */
-void finetuneDQSI(PAST2300DRAMParam param)
+static void finetuneDQSI(PAST2300DRAMParam param)
{
ULONG dlli, dqsip, dqidly, cnt;
ULONG reg_mcr18, reg_mcr0c, passcnt[2], diff;
@@ -5353,7 +5331,7 @@ void finetuneDQSI(PAST2300DRAMParam param)
MOutdwm(mmiobase, 0x1E6E0018, reg_mcr18);
} /* finetuneDQSI */
-Bool CBRDLL2(PAST2300DRAMParam param)
+static Bool CBRDLL2(PAST2300DRAMParam param)
{
ULONG dllmin[2], dllmax[2], dlli, data, data2, passcnt, retry=0;
UCHAR *mmiobase;
@@ -5415,7 +5393,7 @@ CBR_DONE2:
} /* CBRDLL2 */
-void GetDDR2Info(PAST2300DRAMParam param)
+static void GetDDR2Info(PAST2300DRAMParam param)
{
UCHAR *mmiobase;
ULONG trap, TRAP_AC2, TRAP_MRS;
@@ -5663,7 +5641,7 @@ void GetDDR2Info(PAST2300DRAMParam param)
}
-void GetDDR3Info(PAST2300DRAMParam param)
+static void GetDDR3Info(PAST2300DRAMParam param)
{
UCHAR *mmiobase;
ULONG trap, TRAP_AC2, TRAP_MRS;
@@ -5906,7 +5884,7 @@ void GetDDR3Info(PAST2300DRAMParam param)
}
-void DDR2_Init(PAST2300DRAMParam param)
+static void DDR2_Init(PAST2300DRAMParam param)
{
ULONG data, data2, retry = 0;
UCHAR *mmiobase;
@@ -6036,7 +6014,7 @@ DDR2_Init_Start:
#endif
}
-void DDR3_Init(PAST2300DRAMParam param)
+static void DDR3_Init(PAST2300DRAMParam param)
{
ULONG data, data2, retry = 0;
UCHAR *mmiobase;
@@ -6162,7 +6140,7 @@ DDR3_Init_Start:
#endif
}
-void vInitAST2300DRAMReg(ScrnInfoPtr pScrn)
+static void vInitAST2300DRAMReg(ScrnInfoPtr pScrn)
{
ASTRecPtr pAST = ASTPTR(pScrn);
AST2300DRAMParam param;
@@ -6222,7 +6200,7 @@ void vInitAST2300DRAMReg(ScrnInfoPtr pScrn)
} /* vInitAST2300DRAMReg */
-void vGetDefaultSettings(ScrnInfoPtr pScrn)
+void static vGetDefaultSettings(ScrnInfoPtr pScrn)
{
ASTRecPtr pAST = ASTPTR(pScrn);
ULONG ulData;
@@ -6259,7 +6237,7 @@ void vGetDefaultSettings(ScrnInfoPtr pScrn)
} /* vGetDefaultSettings */
-Bool InitDVO(ScrnInfoPtr pScrn)
+static Bool InitDVO(ScrnInfoPtr pScrn)
{
ASTRecPtr pAST = ASTPTR(pScrn);
ULONG ulData;
@@ -6327,7 +6305,7 @@ Bool InitDVO(ScrnInfoPtr pScrn)
return TRUE;
} /* InitDVO */
-void vInit3rdTX(ScrnInfoPtr pScrn)
+static void vInit3rdTX(ScrnInfoPtr pScrn)
{
ASTRecPtr pAST = ASTPTR(pScrn);
ULONG ulData;
@@ -6366,7 +6344,7 @@ void vInit3rdTX(ScrnInfoPtr pScrn)
* Flags: 0: POST init
* 1: resume from power management
*/
-Bool InitVGA(ScrnInfoPtr pScrn, ULONG Flags)
+Bool ASTInitVGA(ScrnInfoPtr pScrn, ULONG Flags)
{
ASTRecPtr pAST;
uint32_t ulData;
@@ -6595,7 +6573,7 @@ ReceiveI2CDataByte(ASTRecPtr pAST)
}
Bool
-GetVGAEDID(ScrnInfoPtr pScrn, unsigned char *pEDIDBuffer)
+ASTGetVGAEDID(ScrnInfoPtr pScrn, unsigned char *pEDIDBuffer)
{
ASTRecPtr pAST;
UCHAR *pjDstEDID;
@@ -6661,9 +6639,9 @@ GetVGAEDID(ScrnInfoPtr pScrn, unsigned char *pEDIDBuffer)
return (TRUE);
-} /* GetVGAEDID */
+} /* ASTGetVGAEDID */
-Bool bInitAST1180(ScrnInfoPtr pScrn)
+Bool bASTInitAST1180(ScrnInfoPtr pScrn)
{
ASTRecPtr pAST;
uint32_t ulData;
@@ -6698,9 +6676,9 @@ Bool bInitAST1180(ScrnInfoPtr pScrn)
return (TRUE);
-} /* bInitAST1180 */
+} /* bASTInitAST1180 */
-void GetAST1180DRAMInfo(ScrnInfoPtr pScrn)
+void ASTGetAST1180DRAMInfo(ScrnInfoPtr pScrn)
{
ASTRecPtr pAST = ASTPTR(pScrn);
ULONG ulData;
@@ -6753,9 +6731,9 @@ void GetAST1180DRAMInfo(ScrnInfoPtr pScrn)
/* MCLK */
pAST->ulMCLK = 200;
-} /* GetAST1180DRAMInfo */
+} /* ASTGetAST1180DRAMInfo */
-void vEnableASTVGAMMIO(ScrnInfoPtr pScrn)
+void vASTEnableVGAMMIO(ScrnInfoPtr pScrn)
{
ASTRecPtr pAST = ASTPTR(pScrn);
ULONG ulData;
--
1.8.4.5
More information about the xorg-devel
mailing list