9184ed24e414bde3c2f0ef2ee7c46b0ddced2e37
[coreboot.git] / src / southbridge / intel / esb6300 / esb6300_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 "esb6300.h"
7
8 static void uhci_init(struct device *dev)
9 {
10         uint32_t cmd;
11
12 #if 1
13         printk_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_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           = esb6300_enable,
36         .ops_pci          = &lops_pci,
37 };
38
39 static const struct pci_driver usb1_driver __pci_driver = {
40         .ops    = &uhci_ops,
41         .vendor = PCI_VENDOR_ID_INTEL,
42         .device = PCI_DEVICE_ID_INTEL_6300ESB_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_6300ESB_USB2,
49 };
50
51 /* Note: May or may not need different init than UHCI. */
52 static const struct pci_driver ehci_driver __pci_driver = {
53         .ops    = &uhci_ops,
54         .vendor = PCI_VENDOR_ID_INTEL,
55         .device = PCI_DEVICE_ID_INTEL_6300ESB_EHCI,
56 };
57