Since some people disapprove of white space cleanups mixed in regular commits
[coreboot.git] / src / southbridge / intel / i82801ex / i82801ex_uhci.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 "i82801ex.h"
7
8 static void uhci_init(struct device *dev)
9 {
10         uint32_t cmd;
11
12 #if 1
13         printk(BIOS_DEBUG, "UHCI: Setting up controller.. ");
14         cmd = pci_read_config32(dev, PCI_COMMAND);
15         pci_write_config32(dev, PCI_COMMAND,
16                 cmd | PCI_COMMAND_MASTER);
17
18
19         printk(BIOS_DEBUG, "done.\n");
20 #endif
21
22 }
23
24 static struct pci_operations lops_pci = {
25         /* The subsystem id follows the ide controller */
26         .set_subsystem = 0,
27 };
28
29 static struct device_operations uhci_ops  = {
30         .read_resources   = pci_dev_read_resources,
31         .set_resources    = pci_dev_set_resources,
32         .enable_resources = pci_dev_enable_resources,
33         .init             = uhci_init,
34         .scan_bus         = 0,
35         .enable           = i82801ex_enable,
36         .ops_pci          = &lops_pci,
37 };
38
39 static const struct pci_driver uhci_driver __pci_driver = {
40         .ops    = &uhci_ops,
41         .vendor = PCI_VENDOR_ID_INTEL,
42         .device = PCI_DEVICE_ID_INTEL_82801ER_USB1,
43 };
44
45 static const struct pci_driver usb2_driver __pci_driver = {
46         .ops    = &uhci_ops,
47         .vendor = PCI_VENDOR_ID_INTEL,
48         .device = PCI_DEVICE_ID_INTEL_82801ER_USB2,
49 };
50
51 static const struct pci_driver usb3_driver __pci_driver = {
52         .ops    = &uhci_ops,
53         .vendor = PCI_VENDOR_ID_INTEL,
54         .device = PCI_DEVICE_ID_INTEL_82801ER_USB3,
55 };
56