summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffy Chen <jeffy.chen@rock-chips.com>2016-12-23 13:52:07 +0800
committerMartin Roth <martinroth@google.com>2017-01-13 17:40:25 +0100
commit9a3f06d202c2aab4809296bb62f3f573133f317c (patch)
treeaa7b39843cc405a70011e8eb657dd22c1aa8c198
parentb6cadc6465e2fbc8aa768fbeb210fc646676f08e (diff)
libpayload: usb: Reset ohci controller when trying to shutdown ohci
Currently we just disabled ohci interrupts when calling ohci_shutdown, Which would not actually shutdown the ohci controller, for example it may still written the increased HccaFrameNumber to Hcca buffer. Perform a soft reset to ohci controller as the linux kernel ohci-hcd driver does. BUG=chrome-os-partner:60996 BRANCH=None TEST=Checked on gru, no more "BUG: Bad page state" error in kernel. Change-Id: I128ab6ba455ac5383a4d48be0bc12b8bb4533464 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 4749fc82fdd1b74ca3f2ed3fdf0ef53a5e161087 Original-Change-Id: I3f192aea627ba2fa69533bc0a4270466ca18f2a7 Original-Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> Original-Reviewed-on: https://chromium-review.googlesource.com/426338 Original-Reviewed-by: Douglas Anderson <dianders@chromium.org> Reviewed-on: https://review.coreboot.org/18125 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Nico Huber <nico.h@gmx.de>
-rw-r--r--payloads/libpayload/drivers/usb/ohci.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/payloads/libpayload/drivers/usb/ohci.c b/payloads/libpayload/drivers/usb/ohci.c
index 83bccb8b89..a5388cb6f6 100644
--- a/payloads/libpayload/drivers/usb/ohci.c
+++ b/payloads/libpayload/drivers/usb/ohci.c
@@ -268,6 +268,7 @@ ohci_shutdown (hci_t *controller)
return;
detach_controller (controller);
ohci_stop(controller);
+ ohci_reset(controller);
free (OHCI_INST (controller)->hcca);
free ((void *)OHCI_INST (controller)->periodic_ed);
free (OHCI_INST (controller));