Since some people disapprove of white space cleanups mixed in regular commits
[coreboot.git] / src / southbridge / intel / esb6300 / esb6300_ac97.c
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>
6 #include "esb6300.h"
7
8 static void ac97_set_subsystem(device_t dev, unsigned vendor, unsigned device)
9 {
10         /* Write the subsystem vendor and device id */
11         pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
12                 ((device & 0xffff) << 16) | (vendor & 0xffff));
13 }
14
15 static struct pci_operations lops_pci = {
16         .set_subsystem = ac97_set_subsystem,
17 };
18 static struct device_operations ac97_ops  = {
19         .read_resources   = pci_dev_read_resources,
20         .set_resources    = pci_dev_set_resources,
21         .enable_resources = pci_dev_enable_resources,
22         .init             = 0,
23         .scan_bus         = 0,
24         .enable           = esb6300_enable,
25         .ops_pci          = &lops_pci,
26 };
27
28 static const struct pci_driver ac97_audio_driver __pci_driver = {
29         .ops    = &ac97_ops,
30         .vendor = PCI_VENDOR_ID_INTEL,
31         .device = PCI_DEVICE_ID_INTEL_6300ESB_AC97_AUDIO,
32 };
33 static const struct pci_driver ac97_modem_driver __pci_driver = {
34         .ops    = &ac97_ops,
35         .vendor = PCI_VENDOR_ID_INTEL,
36         .device = PCI_DEVICE_ID_INTEL_6300ESB_AC97_MODEM,
37 };