summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--src/ast_vgatool.c13
2 files changed, 14 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index ea39c1c..d07e7bf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-04-17 Y.C. Chen <yc_chen@aspeedtech.com>
+
+ * src/ast_vgatool.c: (GetMaxDCLK):
+ Fixed can't get correct MCLK in some platforms
+
2006-04-07 Adam Jackson <ajax@freedesktop.org>
* configure.ac:
diff --git a/src/ast_vgatool.c b/src/ast_vgatool.c
index a464a01..14e0a75 100644
--- a/src/ast_vgatool.c
+++ b/src/ast_vgatool.c
@@ -24,6 +24,7 @@
#include <config.h>
#endif
#include "xf86.h"
+#include "xf86_ansic.h"
#include "xf86_OSproc.h"
#include "xf86Resources.h"
#include "xf86RAC.h"
@@ -128,7 +129,13 @@ GetMaxDCLK(ScrnInfoPtr pScrn)
*(ULONG *) (pAST->MMIOVirtualAddr + 0xF004) = 0x1e6e0000;
*(ULONG *) (pAST->MMIOVirtualAddr + 0xF000) = 0x00000001;
-
+
+ *(ULONG *) (pAST->MMIOVirtualAddr + 0x10100) = 0x000000A8;
+
+ do {
+ ;
+ } while (*(volatile ULONG *) (pAST->MMIOVirtualAddr + 0x10100) != 0x000000A8);
+
/* Get BusWidth */
ulData = *(ULONG * ) (pAST->MMIOVirtualAddr + 0x10004);
if (ulData & 0x40)
@@ -137,9 +144,7 @@ GetMaxDCLK(ScrnInfoPtr pScrn)
ulDRAMBusWidth = 32;
/* Get MCLK */
- {
- *(ULONG *) (pAST->MMIOVirtualAddr + 0x10100) = 0x000000A8;
-
+ {
ulData = *(ULONG *) (pAST->MMIOVirtualAddr + 0x10120);
ulData2 = *(ULONG *) (pAST->MMIOVirtualAddr + 0x10170);
if (ulData2 & 0x2000)