Lines Matching full:ohci

3  * OHCI HCD (Host Controller Driver) for USB.
20 * OHCI Endpoint Descriptor (ED) ... holds TD queue
21 * See OHCI spec, section 4.2
75 #define OKAY_TO_TAKEBACK(ohci, ed) \ argument
76 ((int) (ohci->wdh_cnt - ed->takeback_wdh_cnt) >= 0)
84 * OHCI Transfer Descriptor (TD) ... one per transfer segment
85 * See OHCI spec, sections 4.3.1 (general = control/bulk/interrupt)
164 /* map OHCI TD status codes (CC) to errno values */
187 * structure defined section 4.4.1 of the OHCI spec. The HC is
195 * OHCI defines u16 frame_no, followed by u16 zero pad.
206 * This is the structure of the OHCI controller's memory mapped I/O region.
240 #define MAX_ROOT_PORTS 15 /* maximum OHCI root hub ports (RH_A_NDP) */
249 /* OHCI CONTROL AND STATUS REGISTER MASKS */
296 /* OHCI ROOT HUB REGISTER MASKS */
350 * This is the full ohci controller description
384 void (*start_hnp)(struct ohci_hcd *ohci);
443 static inline int quirk_nec(struct ohci_hcd *ohci) in quirk_nec() argument
445 return ohci->flags & OHCI_QUIRK_NEC; in quirk_nec()
447 static inline int quirk_zfmicro(struct ohci_hcd *ohci) in quirk_zfmicro() argument
449 return ohci->flags & OHCI_QUIRK_ZFMICRO; in quirk_zfmicro()
451 static inline int quirk_amdiso(struct ohci_hcd *ohci) in quirk_amdiso() argument
453 return ohci->flags & OHCI_QUIRK_AMD_PLL; in quirk_amdiso()
455 static inline int quirk_amdprefetch(struct ohci_hcd *ohci) in quirk_amdprefetch() argument
457 return ohci->flags & OHCI_QUIRK_AMD_PREFETCH; in quirk_amdprefetch()
460 static inline int quirk_nec(struct ohci_hcd *ohci) in quirk_nec() argument
464 static inline int quirk_zfmicro(struct ohci_hcd *ohci) in quirk_zfmicro() argument
468 static inline int quirk_amdiso(struct ohci_hcd *ohci) in quirk_amdiso() argument
472 static inline int quirk_amdprefetch(struct ohci_hcd *ohci) in quirk_amdprefetch() argument
483 static inline struct usb_hcd *ohci_to_hcd (const struct ohci_hcd *ohci) in ohci_to_hcd() argument
485 return container_of ((void *) ohci, struct usb_hcd, hcd_priv); in ohci_to_hcd()
490 #define ohci_dbg(ohci, fmt, args...) \ argument
491 dev_dbg (ohci_to_hcd(ohci)->self.controller , fmt , ## args )
492 #define ohci_err(ohci, fmt, args...) \ argument
493 dev_err (ohci_to_hcd(ohci)->self.controller , fmt , ## args )
494 #define ohci_info(ohci, fmt, args...) \ argument
495 dev_info (ohci_to_hcd(ohci)->self.controller , fmt , ## args )
496 #define ohci_warn(ohci, fmt, args...) \ argument
497 dev_warn (ohci_to_hcd(ohci)->self.controller , fmt , ## args )
538 #define big_endian_desc(ohci) (ohci->flags & OHCI_QUIRK_BE_DESC) argument
540 #define big_endian_desc(ohci) 1 /* only big endian */ argument
543 #define big_endian_desc(ohci) 0 /* only little endian */ argument
548 #define big_endian_mmio(ohci) (ohci->flags & OHCI_QUIRK_BE_MMIO) argument
550 #define big_endian_mmio(ohci) 1 /* only big endian */ argument
553 #define big_endian_mmio(ohci) 0 /* only little endian */ argument
561 static inline unsigned int _ohci_readl (const struct ohci_hcd *ohci, in _ohci_readl() argument
565 return big_endian_mmio(ohci) ? in _ohci_readl()
573 static inline void _ohci_writel (const struct ohci_hcd *ohci, in _ohci_writel() argument
577 big_endian_mmio(ohci) ? in _ohci_writel()
591 /* cpu to ohci */
592 static inline __hc16 cpu_to_hc16 (const struct ohci_hcd *ohci, const u16 x) in cpu_to_hc16() argument
594 return big_endian_desc(ohci) ? in cpu_to_hc16()
599 static inline __hc16 cpu_to_hc16p (const struct ohci_hcd *ohci, const u16 *x) in cpu_to_hc16p() argument
601 return big_endian_desc(ohci) ? in cpu_to_hc16p()
606 static inline __hc32 cpu_to_hc32 (const struct ohci_hcd *ohci, const u32 x) in cpu_to_hc32() argument
608 return big_endian_desc(ohci) ? in cpu_to_hc32()
613 static inline __hc32 cpu_to_hc32p (const struct ohci_hcd *ohci, const u32 *x) in cpu_to_hc32p() argument
615 return big_endian_desc(ohci) ? in cpu_to_hc32p()
620 /* ohci to cpu */
621 static inline u16 hc16_to_cpu (const struct ohci_hcd *ohci, const __hc16 x) in hc16_to_cpu() argument
623 return big_endian_desc(ohci) ? in hc16_to_cpu()
628 static inline u16 hc16_to_cpup (const struct ohci_hcd *ohci, const __hc16 *x) in hc16_to_cpup() argument
630 return big_endian_desc(ohci) ? in hc16_to_cpup()
635 static inline u32 hc32_to_cpu (const struct ohci_hcd *ohci, const __hc32 x) in hc32_to_cpu() argument
637 return big_endian_desc(ohci) ? in hc32_to_cpu()
642 static inline u32 hc32_to_cpup (const struct ohci_hcd *ohci, const __hc32 *x) in hc32_to_cpup() argument
644 return big_endian_desc(ohci) ? in hc32_to_cpup()
661 static inline u16 ohci_frame_no(const struct ohci_hcd *ohci) in ohci_frame_no() argument
664 if (big_endian_desc(ohci)) { in ohci_frame_no()
665 tmp = be32_to_cpup((__force __be32 *)&ohci->hcca->frame_no); in ohci_frame_no()
666 if (!(ohci->flags & OHCI_QUIRK_FRAME_NO)) in ohci_frame_no()
669 tmp = le32_to_cpup((__force __le32 *)&ohci->hcca->frame_no); in ohci_frame_no()
674 static inline __hc16 *ohci_hwPSWp(const struct ohci_hcd *ohci, in ohci_hwPSWp() argument
677 return (__hc16 *)(big_endian_desc(ohci) ? in ohci_hwPSWp()
681 static inline u16 ohci_hwPSW(const struct ohci_hcd *ohci, in ohci_hwPSW() argument
684 return hc16_to_cpup(ohci, ohci_hwPSWp(ohci, td, index)); in ohci_hwPSW()
694 static inline void periodic_reinit (struct ohci_hcd *ohci) in periodic_reinit() argument
696 u32 fi = ohci->fminterval & 0x03fff; in periodic_reinit()
697 u32 fit = ohci_readl(ohci, &ohci->regs->fminterval) & FIT; in periodic_reinit()
699 ohci_writel (ohci, (fit ^ FIT) | ohci->fminterval, in periodic_reinit()
700 &ohci->regs->fminterval); in periodic_reinit()
701 ohci_writel (ohci, ((9 * fi) / 10) & 0x3fff, in periodic_reinit()
702 &ohci->regs->periodicstart); in periodic_reinit()
727 /* Declarations of things exported for use by ohci platform drivers */
737 extern int ohci_restart(struct ohci_hcd *ohci);