3 * Actual EHCI will be implemented later
5 * For now, we just deactivate the EHCI controller and routing circuitry
6 * so that any USB2.0 devices activated by the BIOS will show up on the
7 * USB1.1 controllers instead of being routed to EHCI and therefore "invisible"
12 #include "devices/pci.h"
13 #include "devices/usb.h"
17 /* capability registers */
18 #define EHCI_REG_CAPLENGTH 0x00
20 /* operational regisers - must be offset by op_base */
21 #define EHCI_REG_CONFIGFLAG 0x40
23 void ehci_init (void);
33 while ((pd = pci_get_dev_by_class (PCI_MAJOR_SERIALBUS, PCI_MINOR_USB,
34 PCI_USB_IFACE_EHCI, dev_num)) != NULL)
40 io = pci_io_enum (pd, NULL);
43 printf ("IO not found on EHCI device?\n");
46 printf ("Disabling the EHCI controller #%d\n", dev_num - 1);
47 op_base = pci_reg_read8 (io, EHCI_REG_CAPLENGTH);
49 /* turn off EHCI routing */
50 pci_reg_write32 (io, EHCI_REG_CONFIGFLAG + op_base, 0);