usb: host: dwc2: add clk support
[oweals/u-boot.git] / drivers / usb / host / xhci-mem.c
index 04ab540695be69cbc0a236b6d246e6bd56fe7300..93450ee3b7495d7102e69068671ae3dd8a4d8141 100644 (file)
@@ -14,6 +14,7 @@
  */
 
 #include <common.h>
+#include <cpu_func.h>
 #include <dm.h>
 #include <asm/byteorder.h>
 #include <usb.h>
@@ -21,7 +22,7 @@
 #include <asm/cache.h>
 #include <linux/errno.h>
 
-#include "xhci.h"
+#include <usb/xhci.h>
 
 #define CACHELINE_SIZE         CONFIG_SYS_CACHELINE_SIZE
 /**
@@ -369,6 +370,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)