From: Ye Li Date: Mon, 7 Jan 2019 02:45:46 +0000 (+0000) Subject: usb: xhci-mem: Fix scratchpad array issue X-Git-Tag: baikal/mips/sdk5.9~1175^2~5 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=0e562c8e525c5347de5cedc2f2659861f8ca3537;p=uboot.git usb: xhci-mem: Fix scratchpad array issue 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 Reviewed-by: Marek Vasut --- diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 04ab540695..84c2c3344a 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)