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>
This commit is contained in:
parent
45b94bc15f
commit
a482701451
|
@ -119,10 +119,19 @@ struct usbdev_hc {
|
||||||
u32 reg_base;
|
u32 reg_base;
|
||||||
hc_type type;
|
hc_type type;
|
||||||
usbdev_t *devices[128]; // dev 0 is root hub, 127 is last addressable
|
usbdev_t *devices[128]; // dev 0 is root hub, 127 is last addressable
|
||||||
|
|
||||||
|
/* start(): Resume operation. */
|
||||||
void (*start) (hci_t *controller);
|
void (*start) (hci_t *controller);
|
||||||
|
/* stop(): Stop operation but keep controller initialized. */
|
||||||
void (*stop) (hci_t *controller);
|
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);
|
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);
|
void (*shutdown) (hci_t *controller);
|
||||||
|
|
||||||
int (*bulk) (endpoint_t *ep, int size, u8 *data, int finalize);
|
int (*bulk) (endpoint_t *ep, int size, u8 *data, int finalize);
|
||||||
int (*control) (usbdev_t *dev, direction_t pid, int dr_length,
|
int (*control) (usbdev_t *dev, direction_t pid, int dr_length,
|
||||||
void *devreq, int data_length, u8 *data);
|
void *devreq, int data_length, u8 *data);
|
||||||
|
|
Loading…
Reference in New Issue