usb: host: mips: sead3: Fix for big endian.
authorSteven J. Hill <[email protected]>
Fri, 11 May 2012 16:40:25 +0000 (11:40 -0500)
committerGreg Kroah-Hartman <[email protected]>
Fri, 11 May 2012 22:17:30 +0000 (15:17 -0700)
Fix driver to work properly in big endian mode.

Signed-off-by: Steven J. Hill <[email protected]>
Acked-by: Alan Stern <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/usb/host/ehci-sead3.c

index 4c164308ed20727f43cba8b6395c2f91a7be7c5d..cc199e87a7a94cd05112e46b6f4f1412bf6bd704 100644 (file)
@@ -28,17 +28,17 @@ static int ehci_sead3_setup(struct usb_hcd *hcd)
 
        ehci->caps = hcd->regs + 0x100;
 
+#ifdef __BIG_ENDIAN
+       ehci->big_endian_mmio = 1;
+       ehci->big_endian_desc = 1;
+#endif
+
        ret = ehci_setup(hcd);
        if (ret)
                return ret;
 
        ehci->need_io_watchdog = 0;
 
-#ifdef __BIG_ENDIAN
-       ehci->big_endian_mmio = 1;
-       ehci->big_endian_desc = 1;
-#endif
-
        /* Set burst length to 16 words. */
        ehci_writel(ehci, 0x1010, &ehci->regs->reserved[1]);