Lines Matching refs:ohci

75 #define	OKAY_TO_TAKEBACK(ohci, ed)			\
76 ((int) (ohci->wdh_cnt - ed->takeback_wdh_cnt) >= 0)
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)
445 return ohci->flags & OHCI_QUIRK_NEC;
447 static inline int quirk_zfmicro(struct ohci_hcd *ohci)
449 return ohci->flags & OHCI_QUIRK_ZFMICRO;
451 static inline int quirk_amdiso(struct ohci_hcd *ohci)
453 return ohci->flags & OHCI_QUIRK_AMD_PLL;
455 static inline int quirk_amdprefetch(struct ohci_hcd *ohci)
457 return ohci->flags & OHCI_QUIRK_AMD_PREFETCH;
460 static inline int quirk_nec(struct ohci_hcd *ohci)
464 static inline int quirk_zfmicro(struct ohci_hcd *ohci)
468 static inline int quirk_amdiso(struct ohci_hcd *ohci)
472 static inline int quirk_amdprefetch(struct ohci_hcd *ohci)
483 static inline struct usb_hcd *ohci_to_hcd (const struct ohci_hcd *ohci)
485 return container_of ((void *) ohci, struct usb_hcd, hcd_priv);
490 #define ohci_dbg(ohci, fmt, args...) \
491 dev_dbg (ohci_to_hcd(ohci)->self.controller , fmt , ## args )
492 #define ohci_err(ohci, fmt, args...) \
493 dev_err (ohci_to_hcd(ohci)->self.controller , fmt , ## args )
494 #define ohci_info(ohci, fmt, args...) \
495 dev_info (ohci_to_hcd(ohci)->self.controller , fmt , ## args )
496 #define ohci_warn(ohci, fmt, args...) \
497 dev_warn (ohci_to_hcd(ohci)->self.controller , fmt , ## args )
538 #define big_endian_desc(ohci) (ohci->flags & OHCI_QUIRK_BE_DESC)
540 #define big_endian_desc(ohci) 1 /* only big endian */
543 #define big_endian_desc(ohci) 0 /* only little endian */
548 #define big_endian_mmio(ohci) (ohci->flags & OHCI_QUIRK_BE_MMIO)
550 #define big_endian_mmio(ohci) 1 /* only big endian */
553 #define big_endian_mmio(ohci) 0 /* only little endian */
561 static inline unsigned int _ohci_readl (const struct ohci_hcd *ohci,
565 return big_endian_mmio(ohci) ?
573 static inline void _ohci_writel (const struct ohci_hcd *ohci,
577 big_endian_mmio(ohci) ?
591 /* cpu to ohci */
592 static inline __hc16 cpu_to_hc16 (const struct ohci_hcd *ohci, const u16 x)
594 return big_endian_desc(ohci) ?
599 static inline __hc16 cpu_to_hc16p (const struct ohci_hcd *ohci, const u16 *x)
601 return big_endian_desc(ohci) ?
606 static inline __hc32 cpu_to_hc32 (const struct ohci_hcd *ohci, const u32 x)
608 return big_endian_desc(ohci) ?
613 static inline __hc32 cpu_to_hc32p (const struct ohci_hcd *ohci, const u32 *x)
615 return big_endian_desc(ohci) ?
620 /* ohci to cpu */
621 static inline u16 hc16_to_cpu (const struct ohci_hcd *ohci, const __hc16 x)
623 return big_endian_desc(ohci) ?
628 static inline u16 hc16_to_cpup (const struct ohci_hcd *ohci, const __hc16 *x)
630 return big_endian_desc(ohci) ?
635 static inline u32 hc32_to_cpu (const struct ohci_hcd *ohci, const __hc32 x)
637 return big_endian_desc(ohci) ?
642 static inline u32 hc32_to_cpup (const struct ohci_hcd *ohci, const __hc32 *x)
644 return big_endian_desc(ohci) ?
661 static inline u16 ohci_frame_no(const struct ohci_hcd *ohci)
664 if (big_endian_desc(ohci)) {
665 tmp = be32_to_cpup((__force __be32 *)&ohci->hcca->frame_no);
666 if (!(ohci->flags & OHCI_QUIRK_FRAME_NO))
669 tmp = le32_to_cpup((__force __le32 *)&ohci->hcca->frame_no);
674 static inline __hc16 *ohci_hwPSWp(const struct ohci_hcd *ohci,
677 return (__hc16 *)(big_endian_desc(ohci) ?
681 static inline u16 ohci_hwPSW(const struct ohci_hcd *ohci,
684 return hc16_to_cpup(ohci, ohci_hwPSWp(ohci, td, index));
694 static inline void periodic_reinit (struct ohci_hcd *ohci)
696 u32 fi = ohci->fminterval & 0x03fff;
697 u32 fit = ohci_readl(ohci, &ohci->regs->fminterval) & FIT;
699 ohci_writel (ohci, (fit ^ FIT) | ohci->fminterval,
700 &ohci->regs->fminterval);
701 ohci_writel (ohci, ((9 * fi) / 10) & 0x3fff,
702 &ohci->regs->periodicstart);
727 /* Declarations of things exported for use by ohci platform drivers */
737 extern int ohci_restart(struct ohci_hcd *ohci);