updated to pci direct interface by Kevin Hester

This commit is contained in:
Andrew Ip 2002-11-10 06:53:25 +00:00
commit c58f6e2dcf

View file

@ -1,19 +1,28 @@
void
final_superio_fixup()
{
unsigned int devfn = SUPERIO_DEVFN;
unsigned char enables;
/* enable com ports, since we're using this built-in superio */
// enable com1 and com2.
enables = pcibios_read_config_byte(0, devfn, 0x6e, &enables);
// 0x80 is enable com port b, 0x1 is to make it com2, 0x8 is enable com port a as com1
enables = 0x80 | 0x1 | 0x8 ;
pcibios_write_config_byte(0, devfn, 0x6e, enables);
// note: this is also a redo of some port of assembly, but we want everything up.
// set com1 to 115 kbaud
// not clear how to do this yet.
// forget it; done in assembly.
/* Base 8231 controller */
struct pci_dev *dev0 = pci_find_device(PCI_VENDOR_ID_VIA, \
PCI_DEVICE_ID_VIA_8231, 0);
/* enable com ports, since we're using this built-in superio */
/* enable com1 and com2. */
enables = pci_read_config_byte(dev, 0x6e, &enables);
/*
* 0x80 is enable com port b, 0x1 is to make it com2, 0x8 is
* enable com port a as com1
* kevinh/Ispiri - fixed, had 0x1 for com2
*/
enables = 0x80 | 0x10 | 0x8 ;
pci_write_config_byte(dev, 0x6e, enables);
/*
* note: this is also a redo of some port of assembly, but we want
* everything up.
* set com1 to 115 kbaud
* not clear how to do this yet.
* forget it; done in assembly.
*/
}