Merge remote-tracking branch 'lsk/v3.10/topic/gator' into linux-linaro-lsk
[firefly-linux-kernel-4.4.55.git] / drivers / usb / host / ehci-hcd.c
index 4518b8189a9eef908f21abc7f0c5e513239b7f65..d44d43f293becd19c7f6a455255f041554caf223 100644 (file)
@@ -591,11 +591,16 @@ static int ehci_run (struct usb_hcd *hcd)
         */
        hcc_params = ehci_readl(ehci, &ehci->caps->hcc_params);
        if (HCC_64BIT_ADDR(hcc_params)) {
-               ehci_writel(ehci, 0, &ehci->regs->segment);
-#if 0
-// this is deeply broken on almost all architectures
+#ifdef CONFIG_ARM64
+               ehci_writel(ehci, ehci->periodic_dma >> 32, &ehci->regs->segment);
+               /*
+                * this is deeply broken on almost all architectures
+                * but arm64 can use it so enable it
+                */
                if (!dma_set_mask(hcd->self.controller, DMA_BIT_MASK(64)))
                        ehci_info(ehci, "enabled 64bit DMA\n");
+#else
+               ehci_writel(ehci, 0, &ehci->regs->segment);
 #endif
        }