diff options
author | yc_chen <yc_chen> | 2006-04-17 03:27:40 +0000 |
---|---|---|
committer | yc_chen <yc_chen> | 2006-04-17 03:27:40 +0000 |
commit | b3367f4162a7ea295fec2dd424a83861c340cdb8 (patch) | |
tree | 0847cf1820be324c9c147a61e89331e74b783a00 /src | |
parent | 3bc1deb6a84d5ad1ff47b2efe89ed15d68e5822a (diff) |
Fixed can't get correct MCLK in some platformsxf86-video-impact-0_2_0
Diffstat (limited to 'src')
-rw-r--r-- | src/ast_vgatool.c | 13 |
1 files changed, 9 insertions, 4 deletions
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) |