Commit Graph

14 Commits

Author SHA1 Message Date
Lionel Debroux
408fdb8db6 Switch to an array of heaps in the heap manager, and heap IDs in the allocation functions. 2022-07-25 12:53:21 +02:00
martinwhitaker
e6e0f0c8e7
USB improvements (#116)
* Add new heap manager.

* Convert OHCI driver to use new heap manager.

* Convert UHCI driver to use new heap manager.

* Convert EHCI driver to use new heap manager.

* Convert XHCI driver to use new heap manager.

* Convert SMP to use new heap manager.

* Add a "usbinit" boot option to handle various buggy USB devices.

This replaces the "keyboard=buggy-usb" option, and adds a second
workaround to handle the problem seen in issue #107.
2022-07-16 13:34:08 +02:00
Martin Whitaker
260c113bb2 Detect and ignore the HID keyboard "phantom condition" (excessive roll-over). 2022-05-01 22:40:42 +01:00
Martin Whitaker
97d6c7140d Improved USB keyboard report handling.
A USB keyboard may return key codes in any of the 6 key code array
positions (issue #48). So we have to compare the latest report to
the previous one to detect new key presses and handle rollover. As
the same change is needed for all HCI types, factor out the common
code into the base driver.
2022-05-01 16:44:46 +01:00
Martin Whitaker
80bb3f452d ohci: fix startup when the controller is in SUSPEND or RESUME state. 2022-04-23 08:57:55 +01:00
Martin Whitaker
0bd19d9d91 ohci: rename variable used to preserve the frame interval.
For code clarity. No functional change.
2022-04-23 08:49:30 +01:00
Martin Whitaker
0939c5e127 Work around bug in SiS OHCI controllers (issue #43).
The SiS OHCI controller ignores writes to its FmInterval and PeriodicStart
registers when in SUSPEND state, so delay initialisation of these registers
until after we start the controller running.
2022-04-23 08:37:42 +01:00
Martin Whitaker
0873e3b60a Include string.h, not memory.h, when using memcpy and memset.
memory.h is an anachronism, and not present on all systems.
2022-03-11 18:07:01 +00:00
Martin Whitaker
6c79f4d214 Fix communication with low speed devices in OHCI driver (issue #6). 2022-03-04 18:15:17 +00:00
Martin Whitaker
8509e3320a Minor code tweaks - no functional change. 2022-01-23 17:55:57 +00:00
Martin Whitaker
4400ec6f17 Rename usbkbd to usbhcd to better reflect the new design. 2022-01-08 23:14:50 +00:00
Martin Whitaker
52a87c5d40 Add support for USB hubs.
This refactors the USB driver code into a more object-oriented design,
with usbkbd.c being the base class and ohci.c and xhci.c being subclasses.
This makes the code that performs USB device enumeration independent of
the host controller.
2022-01-08 23:00:28 +00:00
Martin Whitaker
84da9f7553 Refactor USB driver code to prepare for supporting USB hubs. 2021-12-29 18:17:46 +00:00
Martin Whitaker
8069b8724b Initial support for native USB keyboard interface.
This adds support for USB keyboards connected directly to an OHCI
or XHCI controller.
2021-12-22 17:31:06 +00:00