| 1 |
|
| 2 |
|
| 3 |
#include <console/console.h> |
| 4 |
#include <device/device.h> |
| 5 |
#include <device/pci.h> |
| 6 |
#include <device/pci_ids.h> |
| 7 |
#include <device/pci_ops.h> |
| 8 |
#include "i82801dx.h" |
| 9 |
|
| 10 |
static void usb_init(struct device *dev) |
| 11 |
{ |
| 12 |
printk(BIOS_DEBUG, "USB: Setting up controller.. "); |
| 13 |
pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_IO | PCI_COMMAND_MEMORY | |
| 14 |
PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE); |
| 15 |
printk(BIOS_DEBUG, "done.\n"); |
| 16 |
} |
| 17 |
|
| 18 |
static struct device_operations usb_ops = { |
| 19 |
.read_resources = pci_dev_read_resources, |
| 20 |
.set_resources = pci_dev_set_resources, |
| 21 |
.enable_resources = pci_dev_enable_resources, |
| 22 |
.init = usb_init, |
| 23 |
.enable = i82801dx_enable, |
| 24 |
}; |
| 25 |
|
| 26 |
|
| 27 |
static const struct pci_driver usb_driver_1 __pci_driver = { |
| 28 |
.ops = &usb_ops, |
| 29 |
.vendor = PCI_VID_INTEL, |
| 30 |
.device = PCI_DID_INTEL_82801DB_USB1, |
| 31 |
}; |
| 32 |
|
| 33 |
|
| 34 |
static const struct pci_driver usb_driver_2 __pci_driver = { |
| 35 |
.ops = &usb_ops, |
| 36 |
.vendor = PCI_VID_INTEL, |
| 37 |
.device = PCI_DID_INTEL_82801DB_USB2, |
| 38 |
}; |
| 39 |
|
| 40 |
|
| 41 |
static const struct pci_driver usb_driver_3 __pci_driver = { |
| 42 |
.ops = &usb_ops, |
| 43 |
.vendor = PCI_VID_INTEL, |
| 44 |
.device = PCI_DID_INTEL_82801DB_USB3, |
| 45 |
}; |