All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2] usb: xhci-mem: Fix scratchpad array issue
@ 2019-01-07  2:45 Ye Li
  2019-01-07  6:22 ` Marek Vasut
  2019-01-07  9:54 ` Bin Meng
  0 siblings, 2 replies; 8+ messages in thread
From: Ye Li @ 2019-01-07  2:45 UTC (permalink / raw)
  To: u-boot

After updating the value of dev_context_ptrs[0], we should flush this
from cache to memory. Otherwise the xhci controller won't use it.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Marek Vasut <marex@denx.de>
---
Changes for v2:
   - Change to use sizeof(ctrl->dcbaa->dev_context_ptrs[0])

 drivers/usb/host/xhci-mem.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index 04ab540..84c2c33 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -369,6 +369,9 @@ static int xhci_scratchpad_alloc(struct xhci_ctrl *ctrl)
 	ctrl->dcbaa->dev_context_ptrs[0] =
 		cpu_to_le64((uintptr_t)scratchpad->sp_array);
 
+	xhci_flush_cache((uintptr_t)&ctrl->dcbaa->dev_context_ptrs[0],
+		sizeof(ctrl->dcbaa->dev_context_ptrs[0]));
+
 	page_size = xhci_readl(&hcor->or_pagesize) & 0xffff;
 	for (i = 0; i < 16; i++) {
 		if ((0x1 & page_size) != 0)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-01-09 15:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-07  2:45 [U-Boot] [PATCH v2] usb: xhci-mem: Fix scratchpad array issue Ye Li
2019-01-07  6:22 ` Marek Vasut
2019-01-07  9:54 ` Bin Meng
2019-01-08  4:00   ` Ye Li
2019-01-08  6:34     ` Bin Meng
2019-01-08 11:11       ` Marek Vasut
2019-01-09  7:05         ` Bin Meng
2019-01-09 15:04           ` Marek Vasut

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.