summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Kochkov <a.kochkov@securitycode.ru>2012-07-06 11:54:17 +0400
committerPatrick Georgi <patrick@georgi-clan.de>2012-07-12 10:00:17 +0200
commitdb2c400ab852a2aae09d812b20e520ca371da35b (patch)
tree76937eaeed903ccb862343d12b2196a26594d975
parent25962837baaa18c58635cd4eb82bba49a89b003b (diff)
downloadcoreboot-db2c400ab852a2aae09d812b20e520ca371da35b.tar.xz
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>
-rw-r--r--payloads/libpayload/drivers/usb/ohci.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/payloads/libpayload/drivers/usb/ohci.c b/payloads/libpayload/drivers/usb/ohci.c
index 8a01cf24fb..606e46791e 100644
--- a/payloads/libpayload/drivers/usb/ohci.c
+++ b/payloads/libpayload/drivers/usb/ohci.c
@@ -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