aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ehci.h')
-rw-r--r--drivers/usb/host/ehci.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index c7d4b5a06bdb..fb7054ccf4fc 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -120,6 +120,16 @@ struct ehci_hcd { /* one per controller */
120 unsigned has_fsl_port_bug:1; /* FreeScale */ 120 unsigned has_fsl_port_bug:1; /* FreeScale */
121 unsigned big_endian_mmio:1; 121 unsigned big_endian_mmio:1;
122 unsigned big_endian_desc:1; 122 unsigned big_endian_desc:1;
123 unsigned has_amcc_usb23:1;
124
125 /* required for usb32 quirk */
126 #define OHCI_CTRL_HCFS (3 << 6)
127 #define OHCI_USB_OPER (2 << 6)
128 #define OHCI_USB_SUSPEND (3 << 6)
129
130 #define OHCI_HCCTRL_OFFSET 0x4
131 #define OHCI_HCCTRL_LEN 0x4
132 __hc32 *ohci_hcctrl_reg;
123 133
124 u8 sbrn; /* packed release number */ 134 u8 sbrn; /* packed release number */
125 135
@@ -636,6 +646,30 @@ static inline void ehci_writel(const struct ehci_hcd *ehci,
636#endif 646#endif
637} 647}
638 648
649/*
650 * On certain ppc-44x SoC there is a HW issue, that could only worked around with
651 * explicit suspend/operate of OHCI. This function hereby makes sense only on that arch.
652 * Other common bits are dependant on has_amcc_usb23 quirk flag.
653 */
654#ifdef CONFIG_44x
655static inline void set_ohci_hcfs(struct ehci_hcd *ehci, int operational)
656{
657 u32 hc_control;
658
659 hc_control = (readl_be(ehci->ohci_hcctrl_reg) & ~OHCI_CTRL_HCFS);
660 if (operational)
661 hc_control |= OHCI_USB_OPER;
662 else
663 hc_control |= OHCI_USB_SUSPEND;
664
665 writel_be(hc_control, ehci->ohci_hcctrl_reg);
666 (void) readl_be(ehci->ohci_hcctrl_reg);
667}
668#else
669static inline void set_ohci_hcfs(struct ehci_hcd *ehci, int operational)
670{ }
671#endif
672
639/*-------------------------------------------------------------------------*/ 673/*-------------------------------------------------------------------------*/
640 674
641/* 675/*