summaryrefslogtreecommitdiff
path: root/src/ast_vgatool.c
diff options
context:
space:
mode:
authorY.C. Chen <yc_chen@aspeedtech.com>2014-03-19 09:12:26 +0800
committerY.C. Chen <yc_chen@aspeedtech.com>2014-03-19 09:12:26 +0800
commitb308902b4a14de08e6d7077c70060a15e87b4fd8 (patch)
treed2bbf6a7b3e0681b894b8d25b8a49be1e48cd5fe /src/ast_vgatool.c
parentf4fa79c12c14854d786dc0427f5a40061e006495 (diff)
Support AST2400
Diffstat (limited to 'src/ast_vgatool.c')
-rw-r--r--src/ast_vgatool.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/ast_vgatool.c b/src/ast_vgatool.c
index fa9d1e2..ccbe986 100644
--- a/src/ast_vgatool.c
+++ b/src/ast_vgatool.c
@@ -126,7 +126,7 @@ GetDRAMInfo(ScrnInfoPtr pScrn)
pAST->ulDRAMBusWidth = 32;
/* Get DRAM Type */
- if (pAST->jChipType == AST2300)
+ if ((pAST->jChipType == AST2300) || (pAST->jChipType == AST2400))
{
switch (ulData & 0x03)
{
@@ -236,7 +236,7 @@ GetMaxDCLK(ScrnInfoPtr pScrn)
/* Modify DARM utilization to 60% for AST1100/2100 16bits DRAM, ycchen@032508 */
if ( ((pAST->jChipType == AST2100) || (pAST->jChipType == AST1100) || (pAST->jChipType == AST2200) || (pAST->jChipType == AST2150)) && (ulDRAMBusWidth == 16) )
DRAMEfficiency = 600;
- else if (pAST->jChipType == AST2300)
+ else if ((pAST->jChipType == AST2300) || (pAST->jChipType == AST2400))
DRAMEfficiency = 400;
ulDRAMBandwidth = ulMCLK * ulDRAMBusWidth * 2 / 8;
ActualDRAMBandwidth = ulDRAMBandwidth * DRAMEfficiency / 1000;
@@ -259,7 +259,7 @@ GetMaxDCLK(ScrnInfoPtr pScrn)
}
/* Add for AST2100, ycchen@061807 */
- if ((pAST->jChipType == AST2100) || (pAST->jChipType == AST2200) || (pAST->jChipType == AST2300) || (pAST->jChipType == AST1180) )
+ if ((pAST->jChipType == AST2100) || (pAST->jChipType == AST2200) || (pAST->jChipType == AST2300) || (pAST->jChipType == AST2400) || (pAST->jChipType == AST1180) )
{
if (ulDCLK > 200) ulDCLK = 200;
}
@@ -334,14 +334,14 @@ GetScratchOptions(ScrnInfoPtr pScrn)
else
{
pAST->SupportWideScreen = FALSE;
- if (pAST->jChipType == AST2300) /* for AST1300 */
- {
- *(ULONG *) (pAST->MMIOVirtualAddr + 0xF004) = 0x1e6e0000;
- *(ULONG *) (pAST->MMIOVirtualAddr + 0xF000) = 0x1;
- ulData = *(ULONG *) (pAST->MMIOVirtualAddr + 0x1207c);
- if ((ulData & 0x0300) == 0) /* AST1300 */
- pAST->SupportWideScreen = TRUE;
- }
+ *(ULONG *) (pAST->MMIOVirtualAddr + 0xF004) = 0x1e6e0000;
+ *(ULONG *) (pAST->MMIOVirtualAddr + 0xF000) = 0x1;
+ ulData = *(ULONG *) (pAST->MMIOVirtualAddr + 0x1207c);
+ ulData &= 0x0300;
+ if ((pAST->jChipType == AST2300) && (ulData == 0x0000)) /* AST1300 */
+ pAST->SupportWideScreen = TRUE;
+ if ((pAST->jChipType == AST2400) && (ulData == 0x0100)) /* AST1400 */
+ pAST->SupportWideScreen = TRUE;
}
} /* switch case */
@@ -721,7 +721,7 @@ void vSetDefExtReg(ScrnInfoPtr pScrn)
}
/* Set Ext. Reg */
- if (pAST->jChipType == AST2300)
+ if ((pAST->jChipType == AST2300) || (pAST->jChipType == AST2400))
{
if (PCI_DEV_REVISION(pAST->PciInfo) > 0x20)
pjExtRegInfo = ExtRegInfo_AST2300;
@@ -749,7 +749,7 @@ void vSetDefExtReg(ScrnInfoPtr pScrn)
/* Enable RAMDAC for A1, ycchen@113005 */
jReg = 0x04;
- if (pAST->jChipType == AST2300)
+ if ((pAST->jChipType == AST2300) || (pAST->jChipType == AST2400))
jReg |= 0x20;
SetIndexRegMask(CRTC_PORT,0xB6, 0xFF, jReg);
@@ -2546,7 +2546,7 @@ void vGetDefaultSettings(ScrnInfoPtr pScrn)
ASTRecPtr pAST = ASTPTR(pScrn);
ULONG ulData;
- if (pAST->jChipType == AST2300)
+ if ((pAST->jChipType == AST2300) || (pAST->jChipType == AST2400))
{
*(ULONG *) (pAST->MMIOVirtualAddr + 0xF004) = 0x1e6e0000;
*(ULONG *) (pAST->MMIOVirtualAddr + 0xF000) = 0x1;
@@ -2604,7 +2604,7 @@ Bool InitVGA(ScrnInfoPtr pScrn, ULONG Flags)
if (Flags == 0)
vGetDefaultSettings(pScrn);
- if (pAST->jChipType == AST2300)
+ if ((pAST->jChipType == AST2300) || (pAST->jChipType == AST2400))
vInitAST2300DRAMReg(pScrn);
else
vInitDRAMReg(pScrn);