From fa14385ac5ae265269e328100d13ac4400e21e0c Mon Sep 17 00:00:00 2001 From: Ionela Voinescu Date: Mon, 2 Feb 2015 15:35:44 +0000 Subject: 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 Original-Commit-Id: 942c385c112c2a4e409da806548081d3e2f8f438 Original-Change-Id: I0c06196501a968a72cb3f2c7dd1027bb22cdaada Original-Signed-off-by: Ionela Voinescu Original-Reviewed-on: https://chromium-review.googlesource.com/245387 Original-Reviewed-by: David Hendricks Original-Reviewed-by: Julius Werner Reviewed-on: http://review.coreboot.org/9455 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- payloads/libpayload/drivers/usb/dwc2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'payloads/libpayload') 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, ®->host.hchn[ch_num].hctsizn); - writel((uint32_t)aligned_buf, ®->host.hchn[ch_num].hcdman); + writel((uint32_t)virt_to_bus(aligned_buf), + ®->host.hchn[ch_num].hcdman); writel(hcchar.d32, ®->host.hchn[ch_num].hccharn); ret = wait_for_complete(ep, ch_num); -- cgit v1.2.3