These changes incorporate steve goodrich'es fixes, and one bug that is

disabled. 

cs5536: add new entires for SB  control etc. 
cs5536.c: chip_enabled function moved to chip_init, so it only gets run
once.
IRQ setup improved
gx2def.h: new defines added
vr.h: new file, with new def's for virtual register control. 
mainboard config.lb: new entries added for nb and sb control.
chipsetinit.c: new controls added -- I forget all the details :-)
grphinit.c: new function added
northbridge.c: new IRQ control added. FlashChipSetup added, controlled
by chip info setupflash struct member. Currently, if enabled, this hangs
OLPC in linux PCI scan.
chip.h: new struct members added for unwanted device enable, flash setup 


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2345 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Ronald G. Minnich
2006-07-21 19:21:38 +00:00
parent 35befb75ea
commit da7ee9fa07
9 changed files with 709 additions and 66 deletions

View File

@@ -1,26 +1,32 @@
#include <arch/io.h>
#include <stdint.h>
#include <cpu/amd/vr.h>
#define VIDEO_MB 8 // MB of video memory
#define VRC_INDEX 0xAC1C // Index register
#define VRC_DATA 0xAC1E // Data register
#define VR_UNLOCK 0xFC53 // Virtual register unlock code
#define VRC_VG 0x02 // SoftVG Class
#define VG_MEM_SIZE 0x00 // bits 7:0 - 512K unit size, bit 8 controller priority
/*
* Write to a Virtual Register
* AX = Class/Index
* CX = data to write
*/
static void vrWrite(uint16_t wClassIndex, uint16_t wData)
void vrWrite(uint16_t wClassIndex, uint16_t wData)
{
outl(((uint32_t) VR_UNLOCK << 16) | wClassIndex, VRC_INDEX);
outw(wData, VRC_DATA);
}
/*
* Read from a Virtual Register
* AX = Class/Index
* Returns a 16-bit word of data
*/
uint16_t vrRead(uint16_t wClassIndex)
{
uint16_t wData;
outl(((uint32_t) VR_UNLOCK << 16) | wClassIndex, VRC_INDEX);
wData = inw(VRC_DATA);
return wData;
}
/*
* This function mirrors the Graphics_Init routine in GeodeROM.