diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2016-02-02 14:35:55 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2016-02-02 22:36:41 -0500 |
commit | 88e9bd7caee694498cadccba5c1e63baad6d83ab (patch) | |
tree | b0fac3d386e5791a7ba83c821daf8cf3fdec360c | |
parent | 32a2b0e38cdd97ad8b0dc988e8114d191801b9e5 (diff) | |
download | seabios-hppa-88e9bd7caee694498cadccba5c1e63baad6d83ab.zip seabios-hppa-88e9bd7caee694498cadccba5c1e63baad6d83ab.tar.gz seabios-hppa-88e9bd7caee694498cadccba5c1e63baad6d83ab.tar.bz2 |
usb: Eliminate USB controller setup thread
There are no longer any sleep or yield calls during the usb controller
device scans, so there is no need to run these device scans in a
separate thread.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r-- | src/hw/usb-ehci.c | 1 | ||||
-rw-r--r-- | src/hw/usb-ohci.c | 1 | ||||
-rw-r--r-- | src/hw/usb-uhci.c | 1 | ||||
-rw-r--r-- | src/hw/usb-xhci.c | 1 | ||||
-rw-r--r-- | src/hw/usb.c | 16 |
5 files changed, 5 insertions, 15 deletions
diff --git a/src/hw/usb-ehci.c b/src/hw/usb-ehci.c index a502d36..a519455 100644 --- a/src/hw/usb-ehci.c +++ b/src/hw/usb-ehci.c @@ -295,7 +295,6 @@ fail: static void ehci_controller_setup(struct pci_device *pci) { - wait_preempt(); // Avoid pci_config_readl when preempting u16 bdf = pci->bdf; u32 baseaddr = pci_config_readl(bdf, PCI_BASE_ADDRESS_0); struct ehci_caps *caps = (void*)(baseaddr & PCI_BASE_ADDRESS_MEM_MASK); diff --git a/src/hw/usb-ohci.c b/src/hw/usb-ohci.c index 7ed964f..0c0bf60 100644 --- a/src/hw/usb-ohci.c +++ b/src/hw/usb-ohci.c @@ -277,7 +277,6 @@ ohci_controller_setup(struct pci_device *pci) cntl->usb.pci = pci; cntl->usb.type = USB_TYPE_OHCI; - wait_preempt(); // Avoid pci_config_readl when preempting u16 bdf = pci->bdf; u32 baseaddr = pci_config_readl(bdf, PCI_BASE_ADDRESS_0); cntl->regs = (void*)(baseaddr & PCI_BASE_ADDRESS_MEM_MASK); diff --git a/src/hw/usb-uhci.c b/src/hw/usb-uhci.c index 6d8aa47..7a11510 100644 --- a/src/hw/usb-uhci.c +++ b/src/hw/usb-uhci.c @@ -250,7 +250,6 @@ uhci_controller_setup(struct pci_device *pci) warn_noalloc(); return; } - wait_preempt(); // Avoid pci_config_readl when preempting memset(cntl, 0, sizeof(*cntl)); cntl->usb.pci = pci; cntl->usb.type = USB_TYPE_UHCI; diff --git a/src/hw/usb-xhci.c b/src/hw/usb-xhci.c index 089cae7..ad541ab 100644 --- a/src/hw/usb-xhci.c +++ b/src/hw/usb-xhci.c @@ -534,7 +534,6 @@ xhci_controller_setup(struct pci_device *pci) } memset(xhci, 0, sizeof(*xhci)); - wait_preempt(); // Avoid pci_config_readl when preempting xhci->baseaddr = pci_config_readl(pci->bdf, PCI_BASE_ADDRESS_0) & PCI_BASE_ADDRESS_MEM_MASK; xhci->caps = (void*)(xhci->baseaddr); diff --git a/src/hw/usb.c b/src/hw/usb.c index 2bffd25..20731d1 100644 --- a/src/hw/usb.c +++ b/src/hw/usb.c @@ -485,21 +485,15 @@ usb_enumerate(struct usbhub_s *hub) } void -__usb_setup(void *data) -{ - dprintf(3, "init usb\n"); - xhci_setup(); - ehci_setup(); - uhci_setup(); - ohci_setup(); -} - -void usb_setup(void) { ASSERT32FLAT(); if (! CONFIG_USB) return; + dprintf(3, "init usb\n"); usb_time_sigatt = romfile_loadint("etc/usb-time-sigatt", USB_TIME_SIGATT); - run_thread(__usb_setup, NULL); + xhci_setup(); + ehci_setup(); + uhci_setup(); + ohci_setup(); } |