aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/host/ehci-hcd.c
diff options
context:
space:
mode:
authorLiviu Dudau <Liviu.Dudau@arm.com>2014-03-10 10:55:37 +0000
committerAlex Shi <alex.shi@linaro.org>2014-05-27 17:30:51 +0800
commitfed47c48b3026fa78523fe4a020d48b1df026503 (patch)
tree4b2598659d44dfb06563d4380ad85be2423c67cc /drivers/usb/host/ehci-hcd.c
parent455c6fdbd219161bd09b1165f11699d6d73de11c (diff)
usb: Enable support for 64bit EHCI host controllers in arm64.
arm64 architecture handles correctly 64bit DMAs and can enable support for 64bit EHCI host controllers. Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com> Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 23b353e73ceb505b4479218c44d0b7b4a15ae89b) Signed-off-by: Alex Shi <alex.shi@linaro.org>
Diffstat (limited to 'drivers/usb/host/ehci-hcd.c')
-rw-r--r--drivers/usb/host/ehci-hcd.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 81cda09b47e3..d1a48e49c0e8 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -590,11 +590,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
+#if 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
}