]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
usb: xhci-mem: Fix scratchpad array issue
authorYe Li <ye.li@nxp.com>
Mon, 7 Jan 2019 02:45:46 +0000 (02:45 +0000)
committerMarek Vasut <marex@denx.de>
Wed, 9 Jan 2019 15:03:56 +0000 (16:03 +0100)
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>
drivers/usb/host/xhci-mem.c

index 04ab540695be69cbc0a236b6d246e6bd56fe7300..84c2c3344adc1792877b6f53307ee3181e19e926 100644 (file)
@@ -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)