libpayload: fix UHCI timeout

UHCI commands should have a timeout of 30ms, not 30s!

Change-Id: Iebcf338317164eb1e683e1de850ffab5022ca3a1
Signed-off-by: Mathias Krause <mathias.krause@secunet.com>
Reviewed-on: http://review.coreboot.org/1085
Reviewed-by: Mathias Krause <minipli@googlemail.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
This commit is contained in:
Mathias Krause 2012-05-29 16:19:19 +02:00 committed by Patrick Georgi
parent 5c4e7aa9e5
commit 7b7b5666f0
1 changed files with 2 additions and 2 deletions

View File

@ -262,12 +262,12 @@ uhci_stop (hci_t *controller)
static td_t *
wait_for_completed_qh (hci_t *controller, qh_t *qh)
{
int timeout = 1000000; /* max 30 ms. */
int timeout = 1000; /* max 30 ms. */
void *current = GET_TD (qh->elementlinkptr);
while (((qh->elementlinkptr & FLISTP_TERMINATE) == 0) && (timeout-- > 0)) {
if (current != GET_TD (qh->elementlinkptr)) {
current = GET_TD (qh->elementlinkptr);
timeout = 1000000;
timeout = 1000;
}
uhci_reg_write16(controller, USBSTS,
uhci_reg_read16(controller, USBSTS) | 0); // clear resettable registers