Lines Matching full:ehci
9 /* definitions used for the EHCI driver */
92 * ehci-timer.c) in parallel with this list.
270 static inline struct usb_hcd *ehci_to_hcd(struct ehci_hcd *ehci) in ehci_to_hcd() argument
272 return container_of((void *) ehci, struct usb_hcd, hcd_priv); in ehci_to_hcd()
281 #define QTD_NEXT(ehci, dma) cpu_to_hc32(ehci, (u32)dma) argument
284 * EHCI Specification 0.95 Section 3.5
292 /* first part defined by EHCI spec */
293 __hc32 hw_next; /* see EHCI 3.5.1 */
294 __hc32 hw_alt_next; /* see EHCI 3.5.2 */
295 __hc32 hw_token; /* see EHCI 3.5.3 */
310 #define ACTIVE_BIT(ehci) cpu_to_hc32(ehci, QTD_STS_ACTIVE) argument
311 #define HALT_BIT(ehci) cpu_to_hc32(ehci, QTD_STS_HALT) argument
312 #define STATUS_BIT(ehci) cpu_to_hc32(ehci, QTD_STS_STS) argument
314 __hc32 hw_buf[5]; /* see EHCI 3.5.4 */
324 /* PID Codes that are used here, from EHCI specification, Table 3-16. */
330 #define QTD_MASK(ehci) cpu_to_hc32(ehci, ~0x1f) argument
338 #define Q_NEXT_TYPE(ehci, dma) ((dma) & cpu_to_hc32(ehci, 3 << 1)) argument
344 * can be used on one system with SoC EHCI controller using big-endian
345 * descriptors as well as a normal little-endian PCI EHCI controller.
354 #define QH_NEXT(ehci, dma) \ argument
355 (cpu_to_hc32(ehci, (((u32) dma) & ~0x01f) | Q_TYPE_QH))
358 #define EHCI_LIST_END(ehci) cpu_to_hc32(ehci, 1) /* "null pointer" to hw */ argument
380 * EHCI Specification 0.95 Section 3.6
387 /* first part defined by EHCI spec */
389 __hc32 hw_next; /* see EHCI 3.6.1 */
390 __hc32 hw_info1; /* see EHCI 3.6.2 */
398 __hc32 hw_info2; /* see EHCI 3.6.2 */
404 __hc32 hw_current; /* qtd list - see EHCI 3.6.4 */
478 * acts like a qh would, if EHCI had them for ISO.
513 * EHCI Specification 0.95 Section 3.3
519 /* first part defined by EHCI spec */
520 __hc32 hw_next; /* see EHCI 3.3.1 */
521 __hc32 hw_transaction[8]; /* see EHCI 3.3.2 */
529 #define ITD_ACTIVE(ehci) cpu_to_hc32(ehci, EHCI_ISOC_ACTIVE) argument
531 __hc32 hw_bufp[7]; /* see EHCI 3.3.3 */
551 * EHCI Specification 0.95 Section 3.4
557 /* first part defined by EHCI spec */
559 /* uses bit field macros above - see EHCI 0.95 Table 3-8 */
560 __hc32 hw_fullspeed_ep; /* EHCI table 3-9 */
561 __hc32 hw_uframe; /* EHCI table 3-10 */
562 __hc32 hw_results; /* EHCI table 3-11 */
574 #define SITD_ACTIVE(ehci) cpu_to_hc32(ehci, SITD_STS_ACTIVE) argument
576 __hc32 hw_buf[2]; /* EHCI table 3-12 */
577 __hc32 hw_backpointer; /* EHCI table 3-13 */
594 * EHCI Specification 0.96 Section 3.7
644 #define ehci_prepare_ports_for_controller_suspend(ehci, do_wakeup) \ argument
645 ehci_adjust_port_wakeup_flags(ehci, true, do_wakeup)
647 #define ehci_prepare_ports_for_controller_resume(ehci) \ argument
648 ehci_adjust_port_wakeup_flags(ehci, false, false)
655 * Some EHCI controllers have a Transaction Translator built into the
665 ehci_port_speed(struct ehci_hcd *ehci, unsigned int portsc) in ehci_port_speed() argument
667 if (ehci_is_TDI(ehci)) { in ehci_port_speed()
668 switch ((portsc >> (ehci->has_hostpc ? 25 : 26)) & 3) { in ehci_port_speed()
685 #define ehci_port_speed(ehci, portsc) USB_PORT_STAT_HIGH_SPEED argument
757 static inline unsigned int ehci_readl(const struct ehci_hcd *ehci, in ehci_readl() argument
761 return ehci_big_endian_mmio(ehci) ? in ehci_readl()
781 static inline void ehci_writel(const struct ehci_hcd *ehci, in ehci_writel() argument
785 ehci_big_endian_mmio(ehci) ? in ehci_writel()
789 if (ehci->imx28_write_fix) in ehci_writel()
802 static inline void set_ohci_hcfs(struct ehci_hcd *ehci, int operational) in set_ohci_hcfs() argument
806 hc_control = (readl_be(ehci->ohci_hcctrl_reg) & ~OHCI_CTRL_HCFS); in set_ohci_hcfs()
812 writel_be(hc_control, ehci->ohci_hcctrl_reg); in set_ohci_hcfs()
813 (void) readl_be(ehci->ohci_hcctrl_reg); in set_ohci_hcfs()
816 static inline void set_ohci_hcfs(struct ehci_hcd *ehci, int operational) in set_ohci_hcfs() argument
823 * The AMCC 440EPx not only implements its EHCI registers in big-endian
826 * EHCI controllers accessed through PCI work normally (little-endian
832 /* cpu to ehci */
833 static inline __hc32 cpu_to_hc32(const struct ehci_hcd *ehci, const u32 x) in cpu_to_hc32() argument
835 return ehci_big_endian_desc(ehci) in cpu_to_hc32()
840 /* ehci to cpu */
841 static inline u32 hc32_to_cpu(const struct ehci_hcd *ehci, const __hc32 x) in hc32_to_cpu() argument
843 return ehci_big_endian_desc(ehci) in hc32_to_cpu()
848 static inline u32 hc32_to_cpup(const struct ehci_hcd *ehci, const __hc32 *x) in hc32_to_cpup() argument
850 return ehci_big_endian_desc(ehci) in hc32_to_cpup()
857 /* cpu to ehci */
858 static inline __hc32 cpu_to_hc32(const struct ehci_hcd *ehci, const u32 x) in cpu_to_hc32() argument
863 /* ehci to cpu */
864 static inline u32 hc32_to_cpu(const struct ehci_hcd *ehci, const __hc32 x) in hc32_to_cpu() argument
869 static inline u32 hc32_to_cpup(const struct ehci_hcd *ehci, const __hc32 *x) in hc32_to_cpup() argument
878 #define ehci_dbg(ehci, fmt, args...) \ argument
879 dev_dbg(ehci_to_hcd(ehci)->self.controller, fmt, ## args)
880 #define ehci_err(ehci, fmt, args...) \ argument
881 dev_err(ehci_to_hcd(ehci)->self.controller, fmt, ## args)
882 #define ehci_info(ehci, fmt, args...) \ argument
883 dev_info(ehci_to_hcd(ehci)->self.controller, fmt, ## args)
884 #define ehci_warn(ehci, fmt, args...) \ argument
885 dev_warn(ehci_to_hcd(ehci)->self.controller, fmt, ## args)
889 /* Declarations of things exported for use by ehci platform drivers */
901 extern int ehci_handshake(struct ehci_hcd *ehci, void __iomem *ptr,
903 extern int ehci_reset(struct ehci_hcd *ehci);
907 extern void ehci_adjust_port_wakeup_flags(struct ehci_hcd *ehci,