Lines Matching refs:ahcd

406 	void (*start_hnp)(struct admhcd *ahcd);
449 static inline struct usb_hcd *admhcd_to_hcd(const struct admhcd *ahcd)
451 return container_of((void *)ahcd, struct usb_hcd, hcd_priv);
461 # define admhc_dbg(ahcd, fmt, args...) \
464 # define admhc_dbg(ahcd, fmt, args...) do { } while (0)
467 #define admhc_err(ahcd, fmt, args...) \
469 #define admhc_info(ahcd, fmt, args...) \
471 #define admhc_warn(ahcd, fmt, args...) \
477 # define admhc_vdbg(ahcd, fmt, args...) do { } while (0)
519 #define big_endian_desc(ahcd) (ahcd->flags & OHCI_QUIRK_BE_DESC)
521 #define big_endian_desc(ahcd) 1 /* only big endian */
524 #define big_endian_desc(ahcd) 0 /* only little endian */
529 #define big_endian_mmio(ahcd) (ahcd->flags & OHCI_QUIRK_BE_MMIO)
531 #define big_endian_mmio(ahcd) 1 /* only big endian */
534 #define big_endian_mmio(ahcd) 0 /* only little endian */
542 static inline unsigned int admhc_readl(const struct admhcd *ahcd,
546 return big_endian_mmio(ahcd) ?
554 static inline void admhc_writel(const struct admhcd *ahcd,
558 big_endian_mmio(ahcd) ?
566 static inline void admhc_writel_flush(const struct admhcd *ahcd)
570 (void) admhc_readl(ahcd, &ahcd->regs->gencontrol);
577 /* cpu to ahcd */
578 static inline __hc16 cpu_to_hc16(const struct admhcd *ahcd, const u16 x)
580 return big_endian_desc(ahcd) ?
585 static inline __hc16 cpu_to_hc16p(const struct admhcd *ahcd, const u16 *x)
587 return big_endian_desc(ahcd) ?
592 static inline __hc32 cpu_to_hc32(const struct admhcd *ahcd, const u32 x)
594 return big_endian_desc(ahcd) ?
599 static inline __hc32 cpu_to_hc32p(const struct admhcd *ahcd, const u32 *x)
601 return big_endian_desc(ahcd) ?
606 /* ahcd to cpu */
607 static inline u16 hc16_to_cpu(const struct admhcd *ahcd, const __hc16 x)
609 return big_endian_desc(ahcd) ?
614 static inline u16 hc16_to_cpup(const struct admhcd *ahcd, const __hc16 *x)
616 return big_endian_desc(ahcd) ?
621 static inline u32 hc32_to_cpu(const struct admhcd *ahcd, const __hc32 x)
623 return big_endian_desc(ahcd) ?
628 static inline u32 hc32_to_cpup(const struct admhcd *ahcd, const __hc32 *x)
630 return big_endian_desc(ahcd) ?
637 static inline u16 admhc_frame_no(const struct admhcd *ahcd)
641 t = admhc_readl(ahcd, &ahcd->regs->fmnumber) & ADMHC_SFN_FN_MASK;
645 static inline u16 admhc_frame_remain(const struct admhcd *ahcd)
649 t = admhc_readl(ahcd, &ahcd->regs->fmnumber) >> ADMHC_SFN_FR_SHIFT;
656 static inline void admhc_disable(struct admhcd *ahcd)
658 admhcd_to_hcd(ahcd)->state = HC_STATE_HALT;
666 static inline void periodic_reinit(struct admhcd *ahcd)
669 u32 fi = ahcd->fminterval & ADMHC_SFI_FI_MASK;
670 u32 fit = admhc_readl(ahcd, &ahcd->regs->fminterval) & FIT;
673 admhc_writel(ahcd, (fit ^ FIT) | ahcd->fminterval,
674 &ahcd->regs->fminterval);
676 u32 fit = admhc_readl(ahcd, &ahcd->regs->fminterval) & FIT;
679 admhc_writel(ahcd, (fit ^ FIT) | ahcd->fminterval,
680 &ahcd->regs->fminterval);
684 static inline u32 admhc_read_rhdesc(struct admhcd *ahcd)
686 return admhc_readl(ahcd, &ahcd->regs->rhdesc);
689 static inline u32 admhc_read_portstatus(struct admhcd *ahcd, int port)
691 return admhc_readl(ahcd, &ahcd->regs->portstatus[port]);
694 static inline void admhc_write_portstatus(struct admhcd *ahcd, int port,
697 admhc_writel(ahcd, value, &ahcd->regs->portstatus[port]);
700 static inline void roothub_write_status(struct admhcd *ahcd, u32 value)
703 admhc_writel(ahcd, value, &ahcd->regs->rhdesc);
706 static inline void admhc_intr_disable(struct admhcd *ahcd, u32 ints)
710 t = admhc_readl(ahcd, &ahcd->regs->int_enable);
712 admhc_writel(ahcd, t, &ahcd->regs->int_enable);
716 static inline void admhc_intr_enable(struct admhcd *ahcd, u32 ints)
720 t = admhc_readl(ahcd, &ahcd->regs->int_enable);
722 admhc_writel(ahcd, t, &ahcd->regs->int_enable);
726 static inline void admhc_intr_ack(struct admhcd *ahcd, u32 ints)
728 admhc_writel(ahcd, ints, &ahcd->regs->int_status);
731 static inline void admhc_dma_enable(struct admhcd *ahcd)
735 t = admhc_readl(ahcd, &ahcd->regs->host_control);
740 admhc_writel(ahcd, t, &ahcd->regs->host_control);
741 admhc_vdbg(ahcd, "DMA enabled\n");
744 static inline void admhc_dma_disable(struct admhcd *ahcd)
748 t = admhc_readl(ahcd, &ahcd->regs->host_control);
753 admhc_writel(ahcd, t, &ahcd->regs->host_control);
754 admhc_vdbg(ahcd, "DMA disabled\n");