• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #include <device/device.h>
4 #include <device/pci.h>
5 #include <device/pci_ids.h>
6 #include "i82371eb.h"
7 
8 /**
9  * Initialize the USB (UHCI) controller.
10  *
11  * Depending on the configuration variable 'usb_enable', enable or
12  * disable the USB (UHCI) controller.
13  *
14  * @param dev The device to use.
15  */
usb_init(struct device * dev)16 static void usb_init(struct device *dev)
17 {
18 	/* TODO: No special init needed? */
19 }
20 
21 static const struct device_operations usb_ops = {
22 	.read_resources		= pci_dev_read_resources,
23 	.set_resources		= pci_dev_set_resources,
24 	.enable_resources	= pci_dev_enable_resources,
25 	.init			= usb_init,
26 	.ops_pci		= 0, /* No subsystem IDs on 82371EB! */
27 };
28 
29 /* Note: No USB on 82371FB/MX (PIIX/MPIIX) and 82437MX. */
30 
31 /* Intel 82371SB (PIIX3) */
32 static const struct pci_driver usb_driver_sb __pci_driver = {
33 	.ops	= &usb_ops,
34 	.vendor	= PCI_VID_INTEL,
35 	.device	= PCI_DID_INTEL_82371SB_USB,
36 };
37 
38 /* Intel 82371AB/EB/MB (PIIX4/PIIX4E/PIIX4M) */
39 /* The 440MX (82443MX) consists of 82443BX + 82371EB (uses same PCI IDs). */
40 static const struct pci_driver usb_driver_ab_eb_mb __pci_driver = {
41 	.ops	= &usb_ops,
42 	.vendor	= PCI_VID_INTEL,
43 	.device	= PCI_DID_INTEL_82371AB_USB,
44 };
45