1 #include <console/console.h>
2 #include <device/device.h>
3 #include <device/pci.h>
4 #include <device/pci_ops.h>
5 #include <device/pci_ids.h>
7 #include <pc80/mc146818rtc.h>
8 #include <pc80/keyboard.h>
12 /* Base 8231 controller */
13 static device_t lpc_dev;
17 printk_err("NO HARD RESET ON VT8231! FIX ME!\n");
20 static void keyboard_on(void)
25 regval = pci_read_config8(lpc_dev, 0x51);
27 pci_write_config8(lpc_dev, 0x51, regval);
32 static void com_port_on(void)
35 // enable com1 and com2.
36 enables = pci_read_config8(dev, 0x6e);
38 /* 0x80 is enable com port b, 0x10 is to make it com2, 0x8
39 * is enable com port a as com1 kevinh/Ispiri - Old code
40 * thought 0x01 would make it com1, that was wrong enables =
41 * 0x80 | 0x10 | 0x8 ; pci_write_config8(dev, 0x6e,
42 * enables); // note: this is also a redo of some port of
43 * assembly, but we want everything up.
46 /* set com1 to 115 kbaud not clear how to do this yet.
47 * forget it; done in assembly.
52 /* FixME: to be removed ? */
53 static void vt8231_enable(struct device *dev)
55 struct southbridge_via_vt8231_config *conf = dev->chip_info;
58 /* the first time called, enable devices not on PCI bus
59 * FIXME: is that device struct there yet? */
60 lpc_dev = dev_find_device(PCI_VENDOR_ID_VIA,
61 PCI_DEVICE_ID_VIA_8231, 0);
62 if (conf->enable_keyboard)
64 if (conf->enable_com_ports)
69 struct chip_operations southbridge_via_vt8231_ops = {
70 CHIP_NAME("VIA VT8231 Southbridge")
71 .enable_dev = vt8231_enable,