| 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 <device/pci_ehci.h> |
| 9 |
#include "i82801dx.h" |
| 10 |
|
| 11 |
static void usb2_init(struct device *dev) |
| 12 |
{ |
| 13 |
printk(BIOS_DEBUG, "USB: Setting up controller.. "); |
| 14 |
pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_IO | PCI_COMMAND_MEMORY | |
| 15 |
PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE); |
| 16 |
printk(BIOS_DEBUG, "done.\n"); |
| 17 |
} |
| 18 |
|
| 19 |
static struct device_operations usb2_ops = { |
| 20 |
.read_resources = pci_ehci_read_resources, |
| 21 |
.set_resources = pci_dev_set_resources, |
| 22 |
.enable_resources = pci_dev_enable_resources, |
| 23 |
.init = usb2_init, |
| 24 |
.enable = i82801dx_enable, |
| 25 |
}; |
| 26 |
|
| 27 |
|
| 28 |
static const struct pci_driver usb2_driver __pci_driver = { |
| 29 |
.ops = &usb2_ops, |
| 30 |
.vendor = PCI_VID_INTEL, |
| 31 |
.device = PCI_DID_INTEL_82801DB_EHCI, |
| 32 |
}; |