2 * This file is part of the coreboot project.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 #include <console/console.h>
20 #include <device/device.h>
21 #include <device/pci.h>
22 #include <device/pci_ids.h>
23 #include <device/pci_ops.h>
26 static void uhci_init(struct device *dev)
31 printk_debug("UHCI: Setting up controller.. ");
32 cmd = pci_read_config32(dev, PCI_COMMAND);
33 pci_write_config32(dev, PCI_COMMAND,
34 cmd | PCI_COMMAND_MASTER);
37 printk_debug("done.\n");
42 static struct pci_operations lops_pci = {
43 /* The subsystem id follows the ide controller */
47 static struct device_operations uhci_ops = {
48 .read_resources = pci_dev_read_resources,
49 .set_resources = pci_dev_set_resources,
50 .enable_resources = pci_dev_enable_resources,
53 .enable = i82801db_enable,
57 static const struct pci_driver usb1_driver __pci_driver = {
59 .vendor = PCI_VENDOR_ID_INTEL,
60 .device = PCI_DEVICE_ID_INTEL_82801DB_USB1,
63 static const struct pci_driver usb2_driver __pci_driver = {
65 .vendor = PCI_VENDOR_ID_INTEL,
66 .device = PCI_DEVICE_ID_INTEL_82801DB_USB2,
69 static const struct pci_driver usb3_driver __pci_driver = {
71 .vendor = PCI_VENDOR_ID_INTEL,
72 .device = PCI_DEVICE_ID_INTEL_82801DB_USB3,