diff options
Diffstat (limited to 'src/northbridge/via/vx800')
-rw-r--r-- | src/northbridge/via/vx800/dev_init.c | 2 | ||||
-rw-r--r-- | src/northbridge/via/vx800/dram_init.c | 6 | ||||
-rw-r--r-- | src/northbridge/via/vx800/dram_init.h | 4 | ||||
-rw-r--r-- | src/northbridge/via/vx800/drdy_bl.c | 6 | ||||
-rw-r--r-- | src/northbridge/via/vx800/freq_setting.c | 2 | ||||
-rw-r--r-- | src/northbridge/via/vx800/raminit.c | 3 | ||||
-rw-r--r-- | src/northbridge/via/vx800/rank_map.c | 1 | ||||
-rw-r--r-- | src/northbridge/via/vx800/uma_ram_setting.c | 18 | ||||
-rw-r--r-- | src/northbridge/via/vx800/vgabios.c | 10 |
9 files changed, 20 insertions, 32 deletions
diff --git a/src/northbridge/via/vx800/dev_init.c b/src/northbridge/via/vx800/dev_init.c index 7ec3c86aef..3a29d29aca 100644 --- a/src/northbridge/via/vx800/dev_init.c +++ b/src/northbridge/via/vx800/dev_init.c @@ -26,7 +26,7 @@ void InitDDR2CHA(DRAM_SYS_ATTR *DramAttr); void InitDDR2CHB(DRAM_SYS_ATTR *DramAttr); void InitDDR2CHC(DRAM_SYS_ATTR *DramAttr); -CB_STATUS VerifyChc(); +CB_STATUS VerifyChc(void); /*=================================================================== Function : DRAMRegInitValue() diff --git a/src/northbridge/via/vx800/dram_init.c b/src/northbridge/via/vx800/dram_init.c index d059b519ef..b6c8cf2ab0 100644 --- a/src/northbridge/via/vx800/dram_init.c +++ b/src/northbridge/via/vx800/dram_init.c @@ -17,12 +17,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -CB_STATUS DDR2_DRAM_INIT() +CB_STATUS DDR2_DRAM_INIT(void) { - CB_STATUS Status; u8 i; u32 RamSize; - BOOLEAN bTest; DRAM_SYS_ATTR DramAttr; PRINT_DEBUG_MEM("DRAM_INIT \r"); @@ -76,7 +74,7 @@ CB_STATUS DDR2_DRAM_INIT() PRINT_DEBUG_MEM_HEX32(RamSize); PRINT_DEBUG_MEM("\r"); DumpRegisters(0, 3); - //bTest = DramBaseTest( M1, RamSize - M1 * 2,SPARE, FALSE); + //BOOLEAN bTest = DramBaseTest( M1, RamSize - M1 * 2,SPARE, FALSE); /* the memory can not correct work, this is because the user set the incorrect memory parameter from setup interface.so we must set the boot mode to recovery mode, let the system to reset and use the spd value to initialize the memory */ diff --git a/src/northbridge/via/vx800/dram_init.h b/src/northbridge/via/vx800/dram_init.h index 51b98934e5..27f73f0f4d 100644 --- a/src/northbridge/via/vx800/dram_init.h +++ b/src/northbridge/via/vx800/dram_init.h @@ -253,9 +253,9 @@ void DRAMRefreshCounter(DRAM_SYS_ATTR * DramAttr); void DRAMRegFinalValue(DRAM_SYS_ATTR * DramAttr); /*set UMA*/ -void SetUMARam(); +void SetUMARam(void); CB_STATUS InstallMemory(DRAM_SYS_ATTR * DramAttr, u32 RamSize); -CB_STATUS DDR2_DRAM_INIT(); +CB_STATUS DDR2_DRAM_INIT(void); #endif diff --git a/src/northbridge/via/vx800/drdy_bl.c b/src/northbridge/via/vx800/drdy_bl.c index 627fb28552..da8aae13c8 100644 --- a/src/northbridge/via/vx800/drdy_bl.c +++ b/src/northbridge/via/vx800/drdy_bl.c @@ -407,9 +407,6 @@ void DRAMDRDYSetting(DRAM_SYS_ATTR * DramAttr) u8 Data, CL, RDRPH; u8 CpuFreq, DramFreq; u8 ProgData[PT894_RDRDY_TBL_Width]; - u8 DelayMode; - u8 DrdyMode; - u8 Index; /* this function has 3 switchs, correspond to 3 level of Drdy setting. @@ -483,16 +480,19 @@ void DRAMDRDYSetting(DRAM_SYS_ATTR * DramAttr) Data = pci_read_config8(MEMCTRL, 0x90); DramFreq = Data & 0x07; + u8 DelayMode; DelayMode = CL + RDRPH; // RDELAYMD = bit0 of (CAS Latency + RDRPH) DelayMode &= 0x01; //In 364, there is no 128 bit if (DelayMode == 1) { // DelayMode 1 + u8 Index; for (Index = 0; Index < PT894_RDRDY_TBL_Width; Index++) ProgData[Index] = PT894_64bit_DELAYMD1_RCONV0[CpuFreq][DramFreq] [Index]; } else { // DelayMode 0 + u8 Index; for (Index = 0; Index < PT894_RDRDY_TBL_Width; Index++) ProgData[Index] = PT894_64bit_DELAYMD0_RCONV0[CpuFreq][DramFreq] diff --git a/src/northbridge/via/vx800/freq_setting.c b/src/northbridge/via/vx800/freq_setting.c index b81b90de79..47a99c3cc1 100644 --- a/src/northbridge/via/vx800/freq_setting.c +++ b/src/northbridge/via/vx800/freq_setting.c @@ -120,7 +120,7 @@ static const u8 CL_DDR2[7] = { 0, 0, 20, 30, 40, 50, 60 }; void CalcCLAndFreq(DRAM_SYS_ATTR * DramAttr) { u8 AllDimmSupportedCL, Tmp; - u8 CLMask, tmpMask, IndexDelta; + u8 CLMask, tmpMask; u8 SckId, BitId, TmpId; u16 CycTime, TmpCycTime; diff --git a/src/northbridge/via/vx800/raminit.c b/src/northbridge/via/vx800/raminit.c index 4daf2b785d..ce9b7d4fab 100644 --- a/src/northbridge/via/vx800/raminit.c +++ b/src/northbridge/via/vx800/raminit.c @@ -55,9 +55,8 @@ * Support one dimm with up to 2 ranks */ -static void ddr2_ram_setup() +static void ddr2_ram_setup(void) { - u8 Data; CB_STATUS Status; PRINT_DEBUG_MEM("In ddr2_ram_setup\r"); diff --git a/src/northbridge/via/vx800/rank_map.c b/src/northbridge/via/vx800/rank_map.c index 00e1e47fa3..df39ce5899 100644 --- a/src/northbridge/via/vx800/rank_map.c +++ b/src/northbridge/via/vx800/rank_map.c @@ -138,7 +138,6 @@ void DRAMSizingEachRank(DRAM_SYS_ATTR * DramAttr) u32 Size; BOOLEAN HasThreeBitBA; u8 Data; - u32 Address; HasThreeBitBA = FALSE; for (Slot = 0; Slot < 2; Slot++) { diff --git a/src/northbridge/via/vx800/uma_ram_setting.c b/src/northbridge/via/vx800/uma_ram_setting.c index 6988ffe4b0..71379e7ec3 100644 --- a/src/northbridge/via/vx800/uma_ram_setting.c +++ b/src/northbridge/via/vx800/uma_ram_setting.c @@ -333,6 +333,7 @@ void SetUMARam(void) ByteVal = (ByteVal & 0xE5) | 0x1A; outb(ByteVal, 0x03d5); +#if 0 u8 table3c43c5[0x70] = { 0x03, 0x01, 0x0F, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -395,9 +396,9 @@ void SetUMARam(void) 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, }; -#if 0 -//for(i=0;i<0xc0;i++) - for (i = 0; i < 0x40; i++) // + + //for(i=0;i<0xc0;i++) + for (i = 0; i < 0x40; i++) { outb(table3c0space[i], 0x03c0 + i); } @@ -410,6 +411,7 @@ void SetUMARam(void) outb(i, 0x03d4); outb(table3d43d5[i], 0x03d5); } + outb(0x92, 0x03d4); outb(0x80, 0x03d5); @@ -419,12 +421,12 @@ void SetUMARam(void) outb(0xe8, 0x03d4); outb(0x40, 0x03d5); #endif -//3d4 3d freq -//IO Port / Index: 3X5.3D -//Scratch Pad Register 4 -// outb(0x39,0x03c4);// - //outb(1 << SLD0F3Val ,0x03c5); +// 3d4 3d freq +// IO Port / Index: 3X5.3D +// Scratch Pad Register 4 +// outb(0x39,0x03c4); +// outb(1 << SLD0F3Val ,0x03c5); // #endif diff --git a/src/northbridge/via/vx800/vgabios.c b/src/northbridge/via/vx800/vgabios.c index f8029ae157..9690170d1e 100644 --- a/src/northbridge/via/vx800/vgabios.c +++ b/src/northbridge/via/vx800/vgabios.c @@ -299,8 +299,6 @@ void do_vgabios(void) unsigned char *buf; unsigned int size = 64 * 1024; int i; - u16 tmp; - u8 tmp8; printk(BIOS_EMERG, "file '%s', line %d\n\n", __FILE__, __LINE__); @@ -646,15 +644,7 @@ pcibios(unsigned long *pedi, unsigned long *pesi, unsigned long *pebp, unsigned long *pesp, unsigned long *pebx, unsigned long *pedx, unsigned long *pecx, unsigned long *peax, unsigned long *pflags) { - unsigned long edi = *pedi; - unsigned long esi = *pesi; - unsigned long ebp = *pebp; - unsigned long esp = *pesp; - unsigned long ebx = *pebx; - unsigned long edx = *pedx; - unsigned long ecx = *pecx; unsigned long eax = *peax; - unsigned long flags = *pflags; unsigned short func = (unsigned short)eax; int retval = 0; unsigned short devid, vendorid, devfn; |