Please bear with me - another rename checkin. This qualifies as trivial, no
[coreboot.git] / src / southbridge / intel / i82801db / i82801db_uhci.c
1 /*
2  * This file is part of the coreboot project.
3  *
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.
8  *
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.
13  *
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
17  */
18
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>
24 #include "i82801db.h"
25
26 static void uhci_init(struct device *dev)
27 {
28         uint32_t cmd;
29
30 #if 1
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);
35
36
37         printk_debug("done.\n");
38 #endif
39
40 }
41
42 static struct pci_operations lops_pci = {
43         /* The subsystem id follows the ide controller */
44         .set_subsystem = 0,
45 };
46
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,
51         .init             = uhci_init,
52         .scan_bus         = 0,
53         .enable           = i82801db_enable,
54         .ops_pci          = &lops_pci,
55 };
56
57 static const struct pci_driver usb1_driver __pci_driver = {
58         .ops    = &uhci_ops,
59         .vendor = PCI_VENDOR_ID_INTEL,
60         .device = PCI_DEVICE_ID_INTEL_82801DB_USB1,
61 };
62
63 static const struct pci_driver usb2_driver __pci_driver = {
64         .ops    = &uhci_ops,
65         .vendor = PCI_VENDOR_ID_INTEL,
66         .device = PCI_DEVICE_ID_INTEL_82801DB_USB2,
67 };
68
69 static const struct pci_driver usb3_driver __pci_driver = {
70         .ops    = &uhci_ops,
71         .vendor = PCI_VENDOR_ID_INTEL,
72         .device = PCI_DEVICE_ID_INTEL_82801DB_USB3,
73 };
74