1. vgabios removed, will go to extra repository
2. Rename sisnb.c to sis761.c
3. Delete many mis-definition for sis device in
src/include/device/pci_ids.h
4. Trim trailing spaces for all files
Signed-off-by: Morgan Tsai <my_tsai@sis.com>
Acked-by: Jordan Crouse <jordan.crouse@amd.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2931 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
diff --git a/src/southbridge/sis/sis966/sis966.c b/src/southbridge/sis/sis966/sis966.c
index b2ce896..86033fe 100644
--- a/src/southbridge/sis/sis966/sis966.c
+++ b/src/southbridge/sis/sis966/sis966.c
@@ -49,7 +49,7 @@
) ) {
uint32_t id;
id = pci_read_config32(lpc_dev, PCI_VENDOR_ID);
- if ( (id < (PCI_VENDOR_ID_SIS | (PCI_DEVICE_ID_SIS_SIS966_LPC << 16)))
+ if ( (id < (PCI_VENDOR_ID_SIS | (PCI_DEVICE_ID_SIS_SIS966_LPC << 16)))
) {
lpc_dev = 0;
}
@@ -62,19 +62,18 @@
{
device_t lpc_dev = 0;
device_t sm_dev = 0;
- unsigned index = 0;
- unsigned index2 = 0;
+ uint16_t index = 0;
+ uint16_t index2 = 0;
uint32_t reg_old, reg;
uint8_t byte;
- unsigned deviceid;
- unsigned vendorid;
+ uint16_t deviceid;
+ uint16_t vendorid;
+ uint16_t devfn;
struct southbridge_sis_sis966_config *conf;
conf = dev->chip_info;
int i;
- unsigned devfn;
-
if(dev->device==0x0000) {
vendorid = pci_read_config32(dev, PCI_VENDOR_ID);
deviceid = (vendorid>>16) & 0xffff;
@@ -88,25 +87,16 @@
switch(deviceid) {
case PCI_DEVICE_ID_SIS_SIS966_HT:
return;
-
- case PCI_DEVICE_ID_SIS_SIS966_SM2://?
- index = 16;
break;
case PCI_DEVICE_ID_SIS_SIS966_USB:
devfn -= (1<<3);
index = 8;
break;
- case PCI_DEVICE_ID_SIS_SIS966_EHCI:
+ case PCI_DEVICE_ID_SIS_SIS966_USB2:
devfn -= (1<<3);
index = 20;
break;
-/* case PCI_DEVICE_ID_SIS_SIS966_USB3:
- devfn -= (1<<3);
- index = 20;
- break;
-*/
- case PCI_DEVICE_ID_SIS_SIS966_NIC1: //two
- case PCI_DEVICE_ID_SIS_SIS966_NIC_BRIDGE://two
+ case PCI_DEVICE_ID_SIS_SIS966_NIC1:
devfn -= (7<<3);
index = 10;
for(i=0;i<2;i++) {
@@ -125,8 +115,7 @@
devfn -= (3<<3);
index = 14;
break;
- case PCI_DEVICE_ID_SIS_SIS966_SATA0: //three
- case PCI_DEVICE_ID_SIS_SIS966_SATA1: //three
+ case PCI_DEVICE_ID_SIS_SIS966_SATA0:
devfn -= (4<<3);
index = 22;
i = (dev->path.u.pci.devfn) & 7;
@@ -138,11 +127,7 @@
devfn -= (5<<3);
index = 15;
break;
-// case PCI_DEVICE_ID_SIS_SIS966_PCIE_A:
-// devfn -= (0x9<<3); // to LPC
-// index2 = 9;
-// break;
- case PCI_DEVICE_ID_SIS_SIS966_PCIE_B_C: //two
+ case PCI_DEVICE_ID_SIS_SIS966_PCIE_B_C:
devfn -= (0xa<<3); // to LPC
index2 = 8;
for(i=0;i<2;i++) {
@@ -216,17 +201,8 @@
if(!sm_dev) return;
final_reg = pci_read_config32(sm_dev, 0xe8);
- final_reg &= ~((1<<16)|(1<<8)|(1<<20)|(1<<14)|(1<<22)|(1<<18)|(1<<17)|(1<<15)|(1<<11)|(1<<10)|(1<<9));
+ final_reg &= ~0x0057cf00;
pci_write_config32(sm_dev, 0xe8, final_reg); //enable all at first
-#if 0
- reg_old = reg = pci_read_config32(sm_dev, 0xe4);
-// reg |= (1<<0);
- reg &= ~(0x3f<<4);
- if (reg != reg_old) {
- printk_debug("sis966.c pcie enabled\n");
- pci_write_config32(sm_dev, 0xe4, reg);
- }
-#endif
}
if (!dev->enabled) {