diff options
author | Julius Werner <jwerner@chromium.org> | 2013-09-03 17:15:31 -0700 |
---|---|---|
committer | Isaac Christensen <isaac.christensen@se-eng.com> | 2014-08-14 23:41:21 +0200 |
commit | 1f86434227beaf9806de86269f8b42eed817ae3a (patch) | |
tree | 25eb1420c05f75de4ca3c79eb4f9ed6c13b60c69 /payloads/libpayload/drivers/usb/xhci_events.c | |
parent | d96541f3fc934fa27b800a07ccf0597bd5a80dd5 (diff) | |
download | coreboot-1f86434227beaf9806de86269f8b42eed817ae3a.tar.xz |
libpayload: xhci: Make XHCI stack usable on ARM
This patch updates the libpayload XHCI stack to run on ARM CPUs (tested
with the DWC3 controller on an Exynos5420). Firstly, it adds support for
64-byte Slot/Endpoint Context sizes. Since the existing context handling
code represented the whole device context as a C struct (whose size has
to be known at compile time), it was necessary to refactor the input and
device context structures to consist of pointers to the actual contexts
instead.
Secondly, it moves all data structures that the xHC accesses through DMA
to cache-coherent memory. With a similar rationale as in the ARM patches
for EHCI, using explicit cache maintenance functions to correctly handle
the actual transfer buffers in all cases is presumably impossible.
Instead this patch also chooses to create a DMA bounce buffer in the
XHCI stack where transfer buffers which are not already cache-coherent
will be copied to/from.
Change-Id: I14e82fffb43b4d52d687b65415f2e33920e088de
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/169453
Reviewed-by: Stefan Reinauer <reinauer@google.com>
(cherry picked from commit 1fa9964063cce6cbd87ba68334806dde8aa2354c)
Signed-off-by: Isaac Christensen <isaac.christensen@se-eng.com>
Reviewed-on: http://review.coreboot.org/6643
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'payloads/libpayload/drivers/usb/xhci_events.c')
-rw-r--r-- | payloads/libpayload/drivers/usb/xhci_events.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/payloads/libpayload/drivers/usb/xhci_events.c b/payloads/libpayload/drivers/usb/xhci_events.c index ab90c59fe3..391ebf6126 100644 --- a/payloads/libpayload/drivers/usb/xhci_events.c +++ b/payloads/libpayload/drivers/usb/xhci_events.c @@ -86,12 +86,10 @@ xhci_handle_transfer_event(xhci_t *const xhci) const int id = TRB_GET(ID, ev); const int ep = TRB_GET(EP, ev); - devinfo_t *di; intrq_t *intrq; if (id && id <= xhci->max_slots_en && - (di = DEVINFO_FROM_XHCI(xhci, id)) && - (intrq = di->interrupt_queues[ep])) { + (intrq = xhci->dev[id].interrupt_queues[ep])) { /* It's a running interrupt endpoint */ intrq->ready = phys_to_virt(ev->ptr_low); if (cc == CC_SUCCESS || cc == CC_SHORT_PACKET) { |