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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
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>
|
|
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>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Reduce the size to make arrays of tds smaller. For interrupt in
pipes, allocate the data space separately.
|
|
Have each controller type allocate its own data structure.
Also, implement freeing of unused uhci controller structures.
|
|
Expand 'struct usb_pipe' with all the fields that are needed from the
encoded 'u32 endp' field.
|
|
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.
|
|
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.
|
|
Add barrier() calls before memory accesses that can be seen by controller.
Fix TD_CTRL_ANY_ERROR macro definition.
Other cleanups.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|