libpayload: usb: dwc2: support split transaction
With split transaction, dwc2 host controller can handle full- and low-speed devices on hub in high-speed mode. This commit adds support for split control and interrupt transfers BUG=None TEST=Connect usb keyboard through hub, usb keyboard can work BRANCH=None Change-Id: If7a00db21c8ad4c635f39581382b877603075d1a Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 4fb514b7f7f7e414fa94bfce05420957b1c57019 Original-Change-Id: I07e64064c6182d33905ae4efb13712645de7cf93 Original-Signed-off-by: Yunzhi Li <lyz@rock-chips.com> Original-Reviewed-on: https://chromium-review.googlesource.com/283282 Original-Tested-by: Lin Huang <hl@rock-chips.com> Original-Commit-Queue: Lin Huang <hl@rock-chips.com> Original-Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-on: http://review.coreboot.org/10956 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
committed by
Patrick Georgi
parent
ae3d71a4d1
commit
ebd3da7dba
@@ -194,30 +194,6 @@ static void ehci_shutdown (hci_t *controller)
|
||||
|
||||
enum { EHCI_OUT=0, EHCI_IN=1, EHCI_SETUP=2 };
|
||||
|
||||
/*
|
||||
* returns the address of the closest USB2.0 hub, which is responsible for
|
||||
* split transactions, along with the number of the used downstream port
|
||||
*/
|
||||
static int closest_usb2_hub(const usbdev_t *dev, int *const addr, int *const port)
|
||||
{
|
||||
const usbdev_t *usb1dev;
|
||||
do {
|
||||
usb1dev = dev;
|
||||
if ((dev->hub >= 0) && (dev->hub < 128))
|
||||
dev = dev->controller->devices[dev->hub];
|
||||
else
|
||||
dev = NULL;
|
||||
} while (dev && (dev->speed < 2));
|
||||
if (dev) {
|
||||
*addr = usb1dev->hub;
|
||||
*port = usb1dev->port;
|
||||
return 0;
|
||||
} else {
|
||||
usb_debug("ehci: Couldn't find closest USB2.0 hub.\n");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* returns handled bytes. assumes that the fields it writes are empty on entry */
|
||||
static int fill_td(qtd_t *td, void* data, int datalen)
|
||||
{
|
||||
|
Reference in New Issue
Block a user