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>
8 static void acpi_init(struct device *dev)
10 printk_debug("Configuring VIA ACPI\n");
12 // Set ACPI base address to IO 0x4000
13 pci_write_config32(dev, 0x48, 0x4001);
15 // Enable ACPI access (and setup like award)
16 pci_write_config8(dev, 0x41, 0x84);
18 // Set hardware monitor base address to IO 0x6000
19 pci_write_config32(dev, 0x70, 0x6001);
21 // Enable hardware monitor (and setup like award)
22 pci_write_config8(dev, 0x74, 0x01);
24 // set IO base address to 0x5000
25 pci_write_config32(dev, 0x90, 0x5001);
28 pci_write_config8(dev, 0xd2, 0x01);
31 static struct device_operations acpi_ops = {
32 .read_resources = pci_dev_read_resources,
33 .set_resources = pci_dev_set_resources,
34 .enable_resources = pci_dev_enable_resources,
40 static const struct pci_driver northbridge_driver __pci_driver = {
42 .vendor = PCI_VENDOR_ID_VIA,
43 .device = PCI_DEVICE_ID_VIA_8231_4,