Since some people disapprove of white space cleanups mixed in regular commits
[coreboot.git] / src / southbridge / amd / amd8111 / amd8111_ac97.c
1 /*
2  * (C) 2003 Linux Networx
3  */
4 #include <console/console.h>
5 #include <device/device.h>
6 #include <device/pci.h>
7 #include <device/pci_ids.h>
8 #include <device/pci_ops.h>
9 #include "amd8111.h"
10
11 static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned device)
12 {
13         pci_write_config32(dev, 0x2c,
14                 ((device & 0xffff) << 16) | (vendor & 0xffff));
15 }
16
17 static struct pci_operations lops_pci = {
18         .set_subsystem = lpci_set_subsystem,
19 };
20
21 static struct device_operations ac97audio_ops  = {
22         .read_resources   = pci_dev_read_resources,
23         .set_resources    = pci_dev_set_resources,
24         .enable_resources = pci_dev_enable_resources,
25         .enable           = amd8111_enable,
26         .init             = 0,
27         .scan_bus         = 0,
28         .ops_pci          = &lops_pci,
29 };
30
31 static const struct pci_driver ac97audio_driver __pci_driver = {
32         .ops    = &ac97audio_ops,
33         .vendor = PCI_VENDOR_ID_AMD,
34         .device = 0x746D,
35 };
36
37
38 static struct device_operations ac97modem_ops  = {
39         .read_resources   = pci_dev_read_resources,
40         .set_resources    = pci_dev_set_resources,
41         .enable_resources = pci_dev_enable_resources,
42         .enable           = amd8111_enable,
43         .init             = 0,
44         .scan_bus         = 0,
45         .ops_pci          = &lops_pci,
46 };
47
48 static const struct pci_driver ac97modem_driver __pci_driver = {
49         .ops    = &ac97modem_ops,
50         .vendor = PCI_VENDOR_ID_AMD,
51         .device = 0x746E,
52 };