usb: ehci: Add 64-bit controller support
authorVincent Palatin <vpalatin@chromium.org>
Thu, 13 Dec 2012 01:55:22 +0000 (17:55 -0800)
committerChanho Park <chanho61.park@samsung.com>
Fri, 24 Jul 2015 07:29:55 +0000 (16:29 +0900)
On EHCI controller with 64-bit address space support, we must initialize
properly the high word for the PCI bus master accesses.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/usb/host/ehci-hcd.c

index 9cfacd78ef6d0b424db3c472fbac28f5826d88ac..fdf873abc8630c2f8e314ebf6a76fdb44b4cf780 100644 (file)
@@ -862,6 +862,9 @@ int usb_lowlevel_init(int index, void **controller)
        if (ehci_hcd_init())
                return -1;
 #endif
+       /* Set the high address word (aka segment) for 64-bit controller */
+       if (ehci_readl(&ehcic[index].hccr->cr_hccparams) & 1)
+               ehci_writel(ehcic[index].hcor->or_ctrldssegment, 0);
 
        /* Set head of reclaim list */
        memset(qh_list, 0, sizeof(*qh_list));