From c58f6e2dcf433173ac6820ef6222126db4097336 Mon Sep 17 00:00:00 2001 From: Andrew Ip Date: Sun, 10 Nov 2002 06:53:25 +0000 Subject: [PATCH] updated to pci direct interface by Kevin Hester --- src/superio/via/vt8231/superio.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/superio/via/vt8231/superio.c b/src/superio/via/vt8231/superio.c index c93ee58ec1..d8f4c24b35 100644 --- a/src/superio/via/vt8231/superio.c +++ b/src/superio/via/vt8231/superio.c @@ -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. + */ }