aboutsummaryrefslogtreecommitdiff
path: root/src/hw/usb-ohci.c
AgeCommit message (Collapse)AuthorFilesLines
2016-02-03pci: Split low-level pci code from higher-level 'struct pci_device' codeKevin O'Connor1-1/+1
Split pci.c into pci.c and pcidevice.c. The low-level code that interacts directly with the PCI devices remains in pci.c, while functions dealing with the higher level pci_device cache move to pcidevice.c. Only pci.c is needed in 16bit mode. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-02-03pci: Implement '%pP' printf handler for 'struct pci_device' pointersKevin O'Connor1-3/+1
Handle '%pP' format descriptions as a pointer to a 'struct pci_device' and display it in bus:device.function (%02x:%02x.%x) format. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-02-02ohci: Convert to new PCI BAR helper functionsKevin O'Connor1-9/+8
Use the pci_enable_x() functions. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-02-02usb: Eliminate USB controller setup threadKevin O'Connor1-1/+0
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>
2016-02-02ehci: Only delay UHCI/OHCI port scan until after EHCI setup completesKevin O'Connor1-0/+3
EHCI controller setup needs to occur prior to checking any UHCI or OHCI ports to ensure a high speed device is not mistakenly configured on a full speed "companion" controller. However, only the UHCI/OHCI port scan needs to be delayed, not the full UHCI/OHCI controller init. This change moves back the ehci controller setup check until port scan in UHCI/OHCI. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-01-07usb: Control transfers always have an 8 byte command sizeKevin O'Connor1-2/+2
There is no need to pass 'cmdsize' to the usb drivers as the cmdsize is always 8 bytes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-01-07ohci: Merge ohci_send_control with ohci_send_bulkKevin O'Connor1-60/+30
Merge both the control and bulk pipe sending functions into one new function: ohci_send_pipe(). The two existing functions were similar, and by merging them the resulting code supports more flexible control transfers. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-01-01usb: Add support for OHCI bulk transfersKevin O'Connor1-17/+71
Support bulk transfers (usb drives) on OHCI USB controllers. Now that there is support for 32bit only drive controllers, it is not that hard to support disks on OHCI controllers, and it may be useful for some old hardware. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-10-16ohci: Export ohci_realloc_pipe() instead of ohci_alloc_pipe()Kevin O'Connor1-2/+5
Support alloc, update, and free from the single exported function. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-10-16usb: Clarify usb freelist manipulationsKevin O'Connor1-2/+2
Rename usb_getFreePipe() to usb_get_freelist(). Add usb_is_freelist() and usb_add_freelist() functions. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-10-16usb: Rename usb_getFrameExp() to usb_get_period()Kevin O'Connor1-1/+1
This is just function renaming - no code implementation changes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-10-16usb: Rename ?hci_control() to ?hci_send_control()Kevin O'Connor1-2/+2
This is just function renaming - no code implementation changes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-09-16usb: Perform device detect polling on all usb controllers.Kevin O'Connor1-15/+2
Move the 100ms (USB_TIME_SIGATT) device detect polling from the ohci/uhci/usb-hub code to the generic usb_hub_port_setup() code. This extends the 100ms polling to ehci and xhci controllers. The code in usb_hub_port_setup() now compares USB_TIME_SIGATT to the start of usb_enumerate(), which may make boots faster when threads are disabled. This patch also changes the meaning of the return code for hub->op->detect() calls. Now 1 indicates device found, 0 indicates device not found, and -1 indicates permanent failure. Also, the xhci controller generic delay of 100ms is replaced with a 20ms root hub power stabilize time. This in combination with the 100ms for USB_TIME_SIGATT should be closer to the USB2 spec (the USB3 spec does not seem to declare an equivalent of USB_TIME_SIGATT). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-09-16ohci: Repeatedly poll for device detect for 100ms.Kevin O'Connor1-4/+11
According to the USB2 specification, a device may take up to 100ms (USB_TIME_SIGATT) after port power stabilizes to be detected. So, continually recheck for a device connection event. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2014-06-14ohci: Update usb command timeouts to use usb_xfer_time()Kevin O'Connor1-4/+3
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-12-27usb: Replace EHCI to UHCI/OHCI synchronization with new scheme.Kevin O'Connor1-5/+16
The previous code attempts to correlate which UHCI and OHCI controllers correlate with which EHCI controllers so that it can ensure high speed devices are handled by the EHCI code while low/full speed devices are handled by the UHCI/OHCI code. Replace this logic by initializing all EHCI controllers first, and then initializing all UHCI and OHCI controllers. This simplifies the code and improves support for some hardware devices that don't follow the OHCI/UHCI to EHCI correlation standard. Also, remove the unused usb->busid field. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-09-18Move function definitions for output.c from util.h to new file output.h.Kevin O'Connor1-6/+7
Also, sort the order of include files in the c files. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-09-18Move malloc code from pmm.c to new files malloc.c and malloc.h.Kevin O'Connor1-0/+1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-09-18Rename util.c to string.c and introduce string.h.Kevin O'Connor1-0/+1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-09-18Split x86 specific functions out of util.c/h to new files x86.c/h.Kevin O'Connor1-0/+1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-09-02Move code centered around specific hardware devices to src/hw/Kevin O'Connor1-0/+534
Move many C files from the src/ directory to the new src/hw/ directory. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>