From b3367f4162a7ea295fec2dd424a83861c340cdb8 Mon Sep 17 00:00:00 2001 From: yc_chen Date: Mon, 17 Apr 2006 03:27:40 +0000 Subject: Fixed can't get correct MCLK in some platforms --- ChangeLog | 5 +++++ src/ast_vgatool.c | 13 +++++++++---- 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 + + * src/ast_vgatool.c: (GetMaxDCLK): + Fixed can't get correct MCLK in some platforms + 2006-04-07 Adam Jackson * 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 #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) -- cgit v1.2.3