diff options
author | Jim Lin <jilin@nvidia.com> | 2014-09-16 16:39:08 +0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-03-21 01:42:59 +0100 |
commit | 627de92d0a7d4a7b3c4f404810bc8157c359c155 (patch) | |
tree | 904db79e41aecb552de397d56e876ed574852ecf /payloads | |
parent | 16713d7a23aa8cdf9ff432a881ba9066c9859992 (diff) | |
download | coreboot-627de92d0a7d4a7b3c4f404810bc8157c359c155.tar.xz |
libpayload ehci: Use 64-byte aligned data structures for periodic transfers
Chapter 3.1 "Periodic Frame List" of EHCI 1.0 specification says
"Frame List Link pointers always reference memory objects that are
32-byte aligned."
jwerner@chromium.org suggests setting it to be 64-byte aligned for
consistency with other EHCI queue structures.
BUG=chrome-os-partner:31993
TEST=Tested on nyan platform. Before adding patch, USB keyboard behind
an external hub is not working to switch between "Default Locale" and
"English" (after pressing ESC+REFRESH+POWER on embedded keyboard and
later Left/Right-Arrow key on USB keyboard).
Change-Id: Ie6259f2df20ae2618c2074e831fad087f227091d
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 23fc02e6ba3b17be4eaf18810ec6fc0d9c0e0b9a
Original-Change-Id: If52ddc43ebd5d509c19f104928dced5bd09b1706
Original-Signed-off-by: Jim Lin <jilin@nvidia.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/218403
Original-Reviewed-by: Tom Warren <twarren@nvidia.com>
Original-Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: http://review.coreboot.org/8738
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'payloads')
-rw-r--r-- | payloads/libpayload/drivers/usb/ehci.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/payloads/libpayload/drivers/usb/ehci.c b/payloads/libpayload/drivers/usb/ehci.c index 6bb23f5586..aa7ea3b980 100644 --- a/payloads/libpayload/drivers/usb/ehci.c +++ b/payloads/libpayload/drivers/usb/ehci.c @@ -643,7 +643,8 @@ static void *ehci_create_intr_queue( return NULL; } - intr_queue_t *const intrq = (intr_queue_t *)malloc(sizeof(intr_queue_t)); + intr_queue_t *const intrq = (intr_queue_t *)dma_memalign(64, + sizeof(intr_queue_t)); /* * reqcount data chunks * plus one more spare, which we'll leave out of queue |