diff options
author | Patrick Georgi <patrick.georgi@secunet.com> | 2011-11-04 12:06:06 +0100 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2011-11-04 22:14:29 +0100 |
commit | bbc523146cfe732eef2ed81fee73c93b1c8e3b34 (patch) | |
tree | c5a2830a72d2c3dd134abd7c8c6adbc3a7e68f3f /payloads/libpayload/drivers/usb/usb.c | |
parent | 01178bb03b1ae9bf51962ad03f8f73929a48e4b2 (diff) | |
download | coreboot-bbc523146cfe732eef2ed81fee73c93b1c8e3b34.tar.xz |
libpayload: Implement usb_exit
So far it was empty and never published. It now exists and shuts down
all controllers (esp. EHCI which resets the port routers).
Change-Id: I81e355e8a05778d6397675417b085a094a6f48ee
Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com>
Reviewed-on: http://review.coreboot.org/397
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'payloads/libpayload/drivers/usb/usb.c')
-rw-r--r-- | payloads/libpayload/drivers/usb/usb.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/payloads/libpayload/drivers/usb/usb.c b/payloads/libpayload/drivers/usb/usb.c index 4f423327d5..995b4c2918 100644 --- a/payloads/libpayload/drivers/usb/usb.c +++ b/payloads/libpayload/drivers/usb/usb.c @@ -68,6 +68,22 @@ detach_controller (hci_t *controller) } /** + * Shut down all controllers + */ +int +usb_exit (void) +{ + if (usb_hcs == 0) + return 0; + hci_t *controller = usb_hcs; + while (controller != 0) { + controller->shutdown(controller); + controller = controller->next; + } + return 0; +} + +/** * Polls all hubs on all USB controllers, to find out about device changes */ void |