diff options
author | Anton Kochkov <a.kochkov@securitycode.ru> | 2012-07-06 11:54:17 +0400 |
---|---|---|
committer | Patrick Georgi <patrick@georgi-clan.de> | 2012-07-12 10:00:17 +0200 |
commit | db2c400ab852a2aae09d812b20e520ca371da35b (patch) | |
tree | 76937eaeed903ccb862343d12b2196a26594d975 /payloads | |
parent | 25962837baaa18c58635cd4eb82bba49a89b003b (diff) | |
download | coreboot-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>
Diffstat (limited to 'payloads')
-rw-r--r-- | payloads/libpayload/drivers/usb/ohci.c | 7 |
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 |