2 * This file is part of the coreboot project.
4 * Copyright (C) 2004 Ronald G. Minnich
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; version 2 of
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
22 #include <console/console.h>
23 #include <device/device.h>
24 #include <device/pci.h>
25 #include <device/pci_ids.h>
26 #include <device/pci_ops.h>
29 static void usb_init(struct device *dev)
32 printk_debug("USB: Setting up controller.. ");
33 cmd = pci_read_config32(dev, PCI_COMMAND);
34 pci_write_config32(dev, PCI_COMMAND,
35 cmd | PCI_COMMAND_IO | PCI_COMMAND_MEMORY |
36 PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE);
37 printk_debug("done.\n");
40 static struct device_operations usb_ops = {
41 .read_resources = pci_dev_read_resources,
42 .set_resources = pci_dev_set_resources,
43 .enable_resources = pci_dev_enable_resources,
46 .enable = i82801dx_enable,
49 /* 82801DB/DBL/DBM USB1 */
50 static const struct pci_driver usb_driver_1 __pci_driver = {
52 .vendor = PCI_VENDOR_ID_INTEL,
53 .device = PCI_DEVICE_ID_INTEL_82801DB_USB1,
56 /* 82801DB/DBL/DBM USB2 */
57 static const struct pci_driver usb_driver_2 __pci_driver = {
59 .vendor = PCI_VENDOR_ID_INTEL,
60 .device = PCI_DEVICE_ID_INTEL_82801DB_USB2,
63 /* 82801DB/DBL/DBM USB3 */
64 static const struct pci_driver usb_driver_3 __pci_driver = {
66 .vendor = PCI_VENDOR_ID_INTEL,
67 .device = PCI_DEVICE_ID_INTEL_82801DB_USB3,