summaryrefslogtreecommitdiff
path: root/payloads/libpayload
diff options
context:
space:
mode:
authorNico Huber <nico.huber@secunet.com>2012-11-12 15:12:35 +0100
committerRonald G. Minnich <rminnich@gmail.com>2012-11-14 17:43:36 +0100
commita482701451391b86b9d48ef5cf2a41f95f421484 (patch)
treed211e87c34571387d7aa5a25f54e718c52c8f678 /payloads/libpayload
parent45b94bc15fe14685c42d3175cdf364e49606ce54 (diff)
downloadcoreboot-a482701451391b86b9d48ef5cf2a41f95f421484.tar.xz
libpayload: Document USB host controller setup functions
The semantics of the controller functions, start(), stop(), reset() and shutdown(), are not self-explanatory which let to some confusion. At least the reset() functions of the different host controller drivers were implemented following different interpretations. Let's make the intended behaviour of these functions clear. The stated inconsistencies will be addressed in following commits. Change-Id: Id2e300f65c21039218b6ba3f87c0fcd4f0dda0a8 Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: http://review.coreboot.org/1848 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'payloads/libpayload')
-rw-r--r--payloads/libpayload/include/usb/usb.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/payloads/libpayload/include/usb/usb.h b/payloads/libpayload/include/usb/usb.h
index 17eca01bd1..8dd2304439 100644
--- a/payloads/libpayload/include/usb/usb.h
+++ b/payloads/libpayload/include/usb/usb.h
@@ -119,10 +119,19 @@ struct usbdev_hc {
u32 reg_base;
hc_type type;
usbdev_t *devices[128]; // dev 0 is root hub, 127 is last addressable
+
+ /* start(): Resume operation. */
void (*start) (hci_t *controller);
+ /* stop(): Stop operation but keep controller initialized. */
void (*stop) (hci_t *controller);
+ /* reset(): Perform a controller reset. The controller needs to
+ be (re)initialized afterwards to work (again). */
void (*reset) (hci_t *controller);
+ /* shutdown(): Stop operation, detach host controller and shutdown
+ this driver instance. After calling shutdown() any
+ other usage of this hci_t* is invalid. */
void (*shutdown) (hci_t *controller);
+
int (*bulk) (endpoint_t *ep, int size, u8 *data, int finalize);
int (*control) (usbdev_t *dev, direction_t pid, int dr_length,
void *devreq, int data_length, u8 *data);