Age | Commit message (Collapse) | Author | Files | Lines |
|
Move many C files from the src/ directory to the new src/hw/ directory.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
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>
|
|
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>
|
|
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>
|
|
Pass the usbdevice_s info to device configuration and allocation
code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
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.
|
|
Initial support for EHCI high-speed USB controllers.
|
|
Expand 'struct usb_pipe' with all the fields that are needed from the
encoded 'u32 endp' field.
|
|
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.
|
|
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.
|
|
Add support for detecting, initializing, and enumerating USB hubs.
|