- 1.1.4
[coreboot.git] / src / northbridge / amd / amdk8 / misc_control.c
1 /* Turn off machine check triggers when reading
2  * pci space where there are no devices.
3  * This is necessary when scaning the bus for
4  * devices which is done by the kernel */
5
6 #include <console/console.h>
7 #include <device/device.h>
8 #include <device/pci.h>
9 #include <device/pci_ids.h>
10 #include <device/pci_ops.h>
11
12 static void misc_control_init(struct device *dev)
13 {
14         uint32_t cmd;
15         
16         printk_debug("NB: Function 3 Misc Control.. ");
17         cmd = pci_read_config32(dev, 0x44);
18         cmd |= (1<<6) | (1<<25);
19         pci_write_config32(dev, 0x44, cmd );
20
21         printk_debug("done.\n");
22 }
23
24 static struct device_operations mcf3_ops  = {
25         .read_resources   = pci_dev_read_resources,
26         .set_resources    = pci_dev_set_resources,
27         .enable_resources = pci_dev_enable_resources,
28         .init             = misc_control_init,
29         .scan_bus         = 0,
30 };
31
32 static struct pci_driver mcf3_driver __pci_driver = {
33         .ops    = &mcf3_ops,
34         .vendor = PCI_VENDOR_ID_AMD,
35         .device = 0x1103,
36 };
37