libpayload: usb: Add interval attribute to endpoints
Read bInterval from endpoint descriptors and store it in our endpoint_t
struct. The interval is encoded dependently on the device' speed and the
endpoint's type. Therefore, it will be normalized to the binary logarithm
of the number of microframes, i.e.
t = 125us * 2^interval
The interval attribute will be used in the xHCI driver.
Original-Change-Id: I65a8eda6145faf34666800789f0292e640a8141b
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: http://review.coreboot.org/3449
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
(cherry picked from commit aee44fa37d)
BUG=chrome-os-partner:21969
TEST=None
Change-Id: Ic42ad3c193390d5838b563346604b1ef9f385b52
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/168094
This commit is contained in:
parent
7e01a85a48
commit
db98cca0ed
2 changed files with 46 additions and 0 deletions
|
|
@ -91,6 +91,8 @@ typedef struct {
|
|||
int toggle;
|
||||
int maxpacketsize;
|
||||
endpoint_type type;
|
||||
int interval; /* expressed as binary logarithm of the number
|
||||
of microframes (i.e. t = 125us * 2^interval) */
|
||||
} endpoint_t;
|
||||
|
||||
enum { FULL_SPEED = 0, LOW_SPEED = 1, HIGH_SPEED = 2, SUPER_SPEED = 3 };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue