aboutsummaryrefslogtreecommitdiff
path: root/src/usb-uhci.h
AgeCommit message (Collapse)AuthorFilesLines
2012-03-10usb: Generalize controller alloc_async_pipe / alloc_intr_pipe code.Kevin O'Connor1-4/+2
Use one function (X_alloc_pipe) as the main entry point for usb pipe allocation in the controller code. The determination of interrupt/bulk/control can be done within the controller. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-03-10usb: Pass 'struct usbdevice_s' to controller alloc_intr_pipe functions.Kevin O'Connor1-1/+2
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-03-10usb: Pass 'struct usbdevice_s' into controller alloc_async functions.Kevin O'Connor1-1/+4
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-03-06usb: Obtain free list items in main code.Kevin O'Connor1-2/+1
Each controller freelist finding code is the same - move it to the common code. This also merges the alloc_control and alloc_bulk code paths. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-03-06usb: Centralize pipe free list code.Kevin O'Connor1-1/+0
Now that all controllers use a free list, maintain the free list in the common code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2011-07-10Push 'struct pci_device' into USB code (instead of using u16 bdf).Kevin O'Connor1-1/+1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2010-03-09Reduce size of USB 'struct uhci_td'.Kevin O'Connor1-3/+0
Reduce the size to make arrays of tds smaller. For interrupt in pipes, allocate the data space separately.
2010-03-09Dynamically allocate USB controller structures.Kevin O'Connor1-1/+1
Have each controller type allocate its own data structure. Also, implement freeing of unused uhci controller structures.
2010-03-09Replace USB encoded 'u32 endp' scheme with explicit struct fields.Kevin O'Connor1-7/+7
Expand 'struct usb_pipe' with all the fields that are needed from the encoded 'u32 endp' field.
2010-02-28Prefer passing a USB "pipe" structure over a USB endp encoding.Kevin O'Connor1-8/+4
Instead of passing the "u32 endp" encoding of the usb endpoint, allocate a "struct usb_pipe" for each end point and pass that. Allocate a control pipe for every device found. Support freeing the pipes after they are done. Implement pipe allocation and freeing for both UHCI and OHCI controllers. Also, don't define every UHCI qh to include a pipe - create a separate structure "struct uhci_pipe". Also, be sure to clear the USBControllers on reset. Also, convert usb_hub_init to return 0 on success. Also, cleanup some of the USB debug messages to make them more consistent.
2010-02-17Initial support for booting from USB drives.Kevin O'Connor1-0/+2
This patch adds initial support for USB Mass Storage Controllers. This includes support for bulk transfers on UHCI controllers. Code to detect a USB MSC device is added, and wrappers for sending "cdb" block commands over USB are added. The scsi "inquiry" command is also added.
2010-02-17USB UHCI cleanups.Kevin O'Connor1-1/+1
Add barrier() calls before memory accesses that can be seen by controller. Fix TD_CTRL_ANY_ERROR macro definition. Other cleanups.
2010-02-13Support USB interrupt schedules on OHCI and UHCI.Kevin O'Connor1-1/+1
The existing code always checks for USB "interrupt in" events every millisecond. Although that's okay, it consumes extra bandwidth. This change interrupt checks to be scheduled according to their requested interval time.
2009-10-24Add simple cooperative threading scheme to allow parallel hw init.Kevin O'Connor1-1/+1
Enable system for running hardware initialization in parallel. The yield() call can now round-robin between "threads". Rework ata controller init to use a thread per controller. Make sure internal drives are registered in a defined order. Run keyboard initialization in a thread. Rework usb init to use a thread per controller.
2009-10-12Add stubs for USB OHCI support.Kevin O'Connor1-3/+5
Enable USB wrapper functions to call either ohci or ehci helpers. Implement pci_config_maskw in place of pci_set_bus_master. Introduce 'struct usb_pipe' in place of 'void *' for pipes.
2009-09-28Initial support for USB, UHCI, and USB Keyboards.Kevin O'Connor1-0/+131
This adds preliminary support for USB controllers and keyboards. Add support for UHCI controllers. Add support for "HID" USB keyboards. Also, fix bug in hexdump() - len need not be power of 4.