libpayload: Add reset function for OHCI USB driver

Implemented OHCI reset function ohci_reset() in ohci.c
for libpayload's USB driver.

Change-Id: Id6518cbe00a21202757b34926bad171909740e97
Signed-off-by: Anton Kochkov <anton.kochkov@gmail.com>
Reviewed-on: http://review.coreboot.org/1177
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
Anton Kochkov 2012-07-06 11:54:17 +04:00 committed by Patrick Georgi
parent 25962837ba
commit db2c400ab8
1 changed files with 7 additions and 0 deletions

View File

@ -49,6 +49,13 @@ static void ohci_process_done_queue(ohci_t *ohci, int spew_debug);
static void
ohci_reset (hci_t *controller)
{
if (controller == NULL)
return;
OHCI_INST(controller)->opreg->HcCommandStatus = HostControllerReset;
mdelay(2); /* wait 2ms */
OCHI_INST(controller)->opreg->HcControl = 0;
mdelay(10); /* wait 10ms */
}
#ifdef USB_DEBUG