aboutsummaryrefslogtreecommitdiff
path: root/src/usb-hub.c
AgeCommit message (Collapse)AuthorFilesLines
2013-09-02Move code centered around specific hardware devices to src/hw/Kevin O'Connor1-185/+0
Move many C files from the src/ directory to the new src/hw/ directory. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-07-21Rename check_tsc() (and similar) to timer_check() and use u32.Kevin O'Connor1-4/+4
Rename the check_tsc() function to timer_check(). The CPU TSC is often not the basis of the timer, so use a more appropriate name. Convert all callers that were using u64 for the timers to use u32. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-02-05Normalize POST initialization function name suffixes.Kevin O'Connor1-1/+1
The POST phase has to invoke many initialization functions, and these functions can have complex inter-dependencies. Try to categorize the functions into 4 classes: preinit - functions called very early in POST where function ordering is very important and the code has limited access to other interfaces. init - functions that initialize internal interfaces and standard external interfaces. This code is generally not dependent on particular hardware and typically does not communicate directly with any hardware devices. setup - functions which access hardware or are dependent on particular hardware or platform devices. prepboot - functions that finalize internal interfaces and that prepare for the boot phase. This patch attempts to normalize the suffixes - functions that used _init(), _setup(), _finalize(), or similar that did not follow the above pattern were renamed. Other than function name changes, there should be no code impact to this patch. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-03-10usb: Build path via chain of usbdevice_s.Kevin O'Connor1-4/+4
Instead of building a dummy u64 with the path, construct the path via the 'struct usbdevice_s' links. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-03-10usb: Push 'struct usbdevice_s' usage through to pipe allocation.Kevin O'Connor1-4/+4
Pass the usbdevice_s info to device configuration and allocation code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2010-05-23Rename check_time() to check_tsc().Kevin O'Connor1-2/+2
2010-03-28Refactor USB hub code.Kevin O'Connor1-56/+50
All four implementations of hubs (and root hubs) were very similar. Replace them with a single implementation that uses callbacks for the three custom parts (detect, reset, disconnect) of each type of hub.
2010-03-09Add USB EHCI controller support.Kevin O'Connor1-1/+2
Initial support for EHCI high-speed USB controllers.
2010-03-09Replace USB encoded 'u32 endp' scheme with explicit struct fields.Kevin O'Connor1-1/+1
Expand 'struct usb_pipe' with all the fields that are needed from the encoded 'u32 endp' field.
2010-03-09Further parallelize USB init by launching a thread per usb port.Kevin O'Connor1-68/+117
Run a thread per usb port in addition to the existing thread per usb controller. This can reduce total boot time by allowing multiple USB devices on the same controller to initialize in parallel. It also makes startup time for critical devices (eg, the keyboard) less dependent on which port they are plugged into.
2010-02-28Prefer passing a USB "pipe" structure over a USB endp encoding.Kevin O'Connor1-19/+22
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-15Initial support for USB hubs.Kevin O'Connor1-0/+138
Add support for detecting, initializing, and enumerating USB hubs.