summaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers
diff options
context:
space:
mode:
authorIonela Voinescu <ionela.voinescu@imgtec.com>2015-02-02 15:35:44 +0000
committerPatrick Georgi <pgeorgi@google.com>2015-04-14 10:43:04 +0200
commitfa14385ac5ae265269e328100d13ac4400e21e0c (patch)
tree915f9b775364e037383c21087074414ba1ad7e2a /payloads/libpayload/drivers
parent8b52c93a73f494364e43833f924fbd13e20530bc (diff)
libpayload dwc2: use bus addresses for buffers
The address of the output buffer sent to the device should be the bus address and not the virtual address. BUG=chrome-os-partner:31438 TEST=tested on Pistachio FPGA and bring up board; USB works properly after this change BRANCH=none Change-Id: I5c9d199e17c3f4303095ad73f4980d32d04c6118 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 942c385c112c2a4e409da806548081d3e2f8f438 Original-Change-Id: I0c06196501a968a72cb3f2c7dd1027bb22cdaada Original-Signed-off-by: Ionela Voinescu <ionela.voinescu@imgtec.com> Original-Reviewed-on: https://chromium-review.googlesource.com/245387 Original-Reviewed-by: David Hendricks <dhendrix@chromium.org> Original-Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-on: http://review.coreboot.org/9455 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'payloads/libpayload/drivers')
-rw-r--r--payloads/libpayload/drivers/usb/dwc2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/payloads/libpayload/drivers/usb/dwc2.c b/payloads/libpayload/drivers/usb/dwc2.c
index 71c4967e7e..e14ff83570 100644
--- a/payloads/libpayload/drivers/usb/dwc2.c
+++ b/payloads/libpayload/drivers/usb/dwc2.c
@@ -253,7 +253,8 @@ dwc2_transfer(endpoint_t *ep, int size, int pid, ep_dir_t dir,
memcpy(aligned_buf, data_buf, size);
writel(hctsiz.d32, &reg->host.hchn[ch_num].hctsizn);
- writel((uint32_t)aligned_buf, &reg->host.hchn[ch_num].hcdman);
+ writel((uint32_t)virt_to_bus(aligned_buf),
+ &reg->host.hchn[ch_num].hcdman);
writel(hcchar.d32, &reg->host.hchn[ch_num].hccharn);
ret = wait_for_complete(ep, ch_num);