blob: 2e60193855b3fb2e45d24c66f0896c59dcc3e0e9 [file] [log] [blame]
Ronald G. Minnich182615d2004-08-24 16:20:46 +00001#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>
Stefan Reinauer138be832010-02-27 01:50:21 +00006#include "i82801dx.h"
Ronald G. Minnich182615d2004-08-24 16:20:46 +00007
8static void usb_init(struct device *dev)
9{
Ronald G. Minnich3b009632004-08-24 22:27:55 +000010
Ronald G. Minnich182615d2004-08-24 16:20:46 +000011
12#if 0
Ronald G. Minnich3b009632004-08-24 22:27:55 +000013 uint32_t cmd;
Ronald G. Minnich182615d2004-08-24 16:20:46 +000014 printk_debug("USB: Setting up controller.. ");
15 cmd = pci_read_config32(dev, PCI_COMMAND);
16 pci_write_config32(dev, PCI_COMMAND,
17 cmd | PCI_COMMAND_IO | PCI_COMMAND_MEMORY |
18 PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE);
19
20
21 printk_debug("done.\n");
22#endif
23
24}
25
26static struct device_operations usb_ops = {
27 .read_resources = pci_dev_read_resources,
28 .set_resources = pci_dev_set_resources,
29 .enable_resources = pci_dev_enable_resources,
30 .init = usb_init,
31 .scan_bus = 0,
Stefan Reinauer138be832010-02-27 01:50:21 +000032 .enable = i82801dx_enable,
Ronald G. Minnich182615d2004-08-24 16:20:46 +000033};
34
Stefan Reinauerf1cf1f72007-10-24 09:08:58 +000035static const struct pci_driver usb_driver_1 __pci_driver = {
Ronald G. Minnich182615d2004-08-24 16:20:46 +000036 .ops = &usb_ops,
37 .vendor = PCI_VENDOR_ID_INTEL,
Uwe Hermanna29ec062007-11-04 03:21:37 +000038 .device = PCI_DEVICE_ID_INTEL_82801DBM_USB1,
Ronald G. Minnich182615d2004-08-24 16:20:46 +000039};
Stefan Reinauerf1cf1f72007-10-24 09:08:58 +000040static const struct pci_driver usb_driver_2 __pci_driver = {
Ronald G. Minnich182615d2004-08-24 16:20:46 +000041 .ops = &usb_ops,
42 .vendor = PCI_VENDOR_ID_INTEL,
Uwe Hermanna29ec062007-11-04 03:21:37 +000043 .device = PCI_DEVICE_ID_INTEL_82801DBM_USB2,
Ronald G. Minnich182615d2004-08-24 16:20:46 +000044};
Stefan Reinauerf1cf1f72007-10-24 09:08:58 +000045static const struct pci_driver usb_driver_3 __pci_driver = {
Ronald G. Minnich182615d2004-08-24 16:20:46 +000046 .ops = &usb_ops,
47 .vendor = PCI_VENDOR_ID_INTEL,
Uwe Hermanna29ec062007-11-04 03:21:37 +000048 .device = PCI_DEVICE_ID_INTEL_82801DBM_USB3,
Ronald G. Minnich182615d2004-08-24 16:20:46 +000049};