1 #include <console/console.h>
2 #include <device/device.h>
3 #include <device/pci.h>
4 #include <device/pci_ids.h>
5 #include <device/pci_ops.h>
7 static void acpi_init(struct device *dev)
13 printk_debug("ACPI: disabling NMI watchdog.. ");
14 pci_read_config_byte(dev, 0x49, &byte);
15 pci_write_config_byte(dev, 0x49, byte | (1<<2));
18 pci_read_config_byte(dev, 0x41, &byte);
19 pci_write_config_byte(dev, 0x41, byte | (1<<6)|(1<<2));
21 /* added from sourceforge */
22 pci_read_config_byte(dev, 0x48, &byte);
23 pci_write_config_byte(dev, 0x48, byte | (1<<3));
25 printk_debug("done.\n");
28 printk_debug("ACPI: Routing IRQ 12 to PS2 port.. ");
29 pci_read_config_word(dev, 0x46, &word);
30 pci_write_config_word(dev, 0x46, word | (1<<9));
31 printk_debug("done.\n");
34 printk_debug("ACPI: setting PM class code.. ");
35 pci_write_config_dword(dev, 0x60, 0x06800000);
36 printk_debug("done.\n");
41 static struct device_operations acpi_ops = {
42 .read_resources = pci_dev_read_resources,
43 .set_resources = pci_dev_set_resources,
44 .enable_resources = pci_dev_enable_resources,
49 static struct pci_driver acpi_driver __pci_driver = {
51 .vendor = PCI_VENDOR_ID_AMD,
52 .device = PCI_DEVICE_ID_AMD_8111_ACPI,