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>
This commit is contained in:
Patrick Georgi 2011-11-04 12:06:06 +01:00 committed by Stefan Reinauer
parent 01178bb03b
commit bbc523146c
3 changed files with 17 additions and 5 deletions

View File

@ -67,6 +67,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
*/

View File

@ -139,8 +139,3 @@ usb_initialize (void)
return 0;
}
int
usb_exit (void)
{
return 0;
}

View File

@ -123,6 +123,7 @@ void rtc_read_clock(struct tm *tm);
* @{
*/
int usb_initialize(void);
int usb_exit (void);
int usbhid_havechar(void);
int usbhid_getchar(void);
/** @} */