Lines Matching refs:ohci

341  * This is the full ohci controller description
380 void (*start_hnp)(struct ohci_hcd *ohci);
432 static inline int quirk_nec(struct ohci_hcd *ohci)
434 return ohci->flags & OHCI_QUIRK_NEC;
436 static inline int quirk_zfmicro(struct ohci_hcd *ohci)
438 return ohci->flags & OHCI_QUIRK_ZFMICRO;
440 static inline int quirk_amdiso(struct ohci_hcd *ohci)
442 return ohci->flags & OHCI_QUIRK_AMD_PLL;
444 static inline int quirk_amdprefetch(struct ohci_hcd *ohci)
446 return ohci->flags & OHCI_QUIRK_AMD_PREFETCH;
449 static inline int quirk_nec(struct ohci_hcd *ohci)
453 static inline int quirk_zfmicro(struct ohci_hcd *ohci)
457 static inline int quirk_amdiso(struct ohci_hcd *ohci)
461 static inline int quirk_amdprefetch(struct ohci_hcd *ohci)
472 static inline struct usb_hcd *ohci_to_hcd (const struct ohci_hcd *ohci)
474 return container_of ((void *) ohci, struct usb_hcd, hcd_priv);
483 #define ohci_dbg(ohci, fmt, args...) \
484 dev_dbg (ohci_to_hcd(ohci)->self.controller , fmt , ## args )
485 #define ohci_err(ohci, fmt, args...) \
486 dev_err (ohci_to_hcd(ohci)->self.controller , fmt , ## args )
487 #define ohci_info(ohci, fmt, args...) \
488 dev_info (ohci_to_hcd(ohci)->self.controller , fmt , ## args )
489 #define ohci_warn(ohci, fmt, args...) \
490 dev_warn (ohci_to_hcd(ohci)->self.controller , fmt , ## args )
495 # define ohci_vdbg(ohci, fmt, args...) do { } while (0)
537 #define big_endian_desc(ohci) (ohci->flags & OHCI_QUIRK_BE_DESC)
539 #define big_endian_desc(ohci) 1 /* only big endian */
542 #define big_endian_desc(ohci) 0 /* only little endian */
547 #define big_endian_mmio(ohci) (ohci->flags & OHCI_QUIRK_BE_MMIO)
549 #define big_endian_mmio(ohci) 1 /* only big endian */
552 #define big_endian_mmio(ohci) 0 /* only little endian */
560 static inline unsigned int _ohci_readl (const struct ohci_hcd *ohci,
564 return big_endian_mmio(ohci) ?
572 static inline void _ohci_writel (const struct ohci_hcd *ohci,
576 big_endian_mmio(ohci) ?
590 /* cpu to ohci */
591 static inline __hc16 cpu_to_hc16 (const struct ohci_hcd *ohci, const u16 x)
593 return big_endian_desc(ohci) ?
598 static inline __hc16 cpu_to_hc16p (const struct ohci_hcd *ohci, const u16 *x)
600 return big_endian_desc(ohci) ?
605 static inline __hc32 cpu_to_hc32 (const struct ohci_hcd *ohci, const u32 x)
607 return big_endian_desc(ohci) ?
612 static inline __hc32 cpu_to_hc32p (const struct ohci_hcd *ohci, const u32 *x)
614 return big_endian_desc(ohci) ?
619 /* ohci to cpu */
620 static inline u16 hc16_to_cpu (const struct ohci_hcd *ohci, const __hc16 x)
622 return big_endian_desc(ohci) ?
627 static inline u16 hc16_to_cpup (const struct ohci_hcd *ohci, const __hc16 *x)
629 return big_endian_desc(ohci) ?
634 static inline u32 hc32_to_cpu (const struct ohci_hcd *ohci, const __hc32 x)
636 return big_endian_desc(ohci) ?
641 static inline u32 hc32_to_cpup (const struct ohci_hcd *ohci, const __hc32 *x)
643 return big_endian_desc(ohci) ?
656 #define big_endian_frame_no_quirk(ohci) (ohci->flags & OHCI_QUIRK_FRAME_NO)
658 #define big_endian_frame_no_quirk(ohci) 0
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 (!big_endian_frame_no_quirk(ohci))
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);