Lines Matching refs:uhci
85 #define UHCI_PTR_BITS(uhci) cpu_to_hc32((uhci), 0x000F) argument
86 #define UHCI_PTR_TERM(uhci) cpu_to_hc32((uhci), 0x0001) argument
87 #define UHCI_PTR_QH(uhci) cpu_to_hc32((uhci), 0x0002) argument
88 #define UHCI_PTR_DEPTH(uhci) cpu_to_hc32((uhci), 0x0004) argument
89 #define UHCI_PTR_BREADTH(uhci) cpu_to_hc32((uhci), 0x0000) argument
193 #define LINK_TO_QH(uhci, qh) (UHCI_PTR_QH((uhci)) | \ argument
194 cpu_to_hc32((uhci), (qh)->dma_handle))
227 #define td_token(uhci, td) hc32_to_cpu((uhci), (td)->token) argument
278 #define td_status(uhci, td) hc32_to_cpu((uhci), \ argument
281 #define LINK_TO_TD(uhci, td) (cpu_to_hc32((uhci), (td)->dma_handle)) argument
450 void (*reset_hc) (struct uhci_hcd *uhci);
451 int (*check_and_reset_hc) (struct uhci_hcd *uhci);
453 void (*configure_hc) (struct uhci_hcd *uhci);
455 int (*resume_detect_interrupts_are_broken) (struct uhci_hcd *uhci);
457 int (*global_suspend_mode_is_broken) (struct uhci_hcd *uhci);
465 static inline struct usb_hcd *uhci_to_hcd(struct uhci_hcd *uhci) in uhci_to_hcd() argument
467 return container_of((void *) uhci, struct usb_hcd, hcd_priv); in uhci_to_hcd()
497 static inline bool uhci_is_aspeed(const struct uhci_hcd *uhci) in uhci_is_aspeed() argument
499 return IS_ENABLED(CONFIG_USB_UHCI_ASPEED) && uhci->is_aspeed; in uhci_is_aspeed()
510 static inline u32 uhci_readl(const struct uhci_hcd *uhci, int reg) in uhci_readl() argument
512 return inl(uhci->io_addr + reg); in uhci_readl()
515 static inline void uhci_writel(const struct uhci_hcd *uhci, u32 val, int reg) in uhci_writel() argument
517 outl(val, uhci->io_addr + reg); in uhci_writel()
520 static inline u16 uhci_readw(const struct uhci_hcd *uhci, int reg) in uhci_readw() argument
522 return inw(uhci->io_addr + reg); in uhci_readw()
525 static inline void uhci_writew(const struct uhci_hcd *uhci, u16 val, int reg) in uhci_writew() argument
527 outw(val, uhci->io_addr + reg); in uhci_writew()
530 static inline u8 uhci_readb(const struct uhci_hcd *uhci, int reg) in uhci_readb() argument
532 return inb(uhci->io_addr + reg); in uhci_readb()
535 static inline void uhci_writeb(const struct uhci_hcd *uhci, u8 val, int reg) in uhci_writeb() argument
537 outb(val, uhci->io_addr + reg); in uhci_writeb()
587 static inline u32 uhci_readl(const struct uhci_hcd *uhci, int reg) in uhci_readl() argument
589 if (uhci_has_pci_registers(uhci)) in uhci_readl()
590 return inl(uhci->io_addr + reg); in uhci_readl()
591 else if (uhci_is_aspeed(uhci)) in uhci_readl()
592 return readl(uhci->regs + uhci_aspeed_reg(reg)); in uhci_readl()
594 else if (uhci_big_endian_mmio(uhci)) in uhci_readl()
595 return readl_be(uhci->regs + reg); in uhci_readl()
598 return readl(uhci->regs + reg); in uhci_readl()
601 static inline void uhci_writel(const struct uhci_hcd *uhci, u32 val, int reg) in uhci_writel() argument
603 if (uhci_has_pci_registers(uhci)) in uhci_writel()
604 outl(val, uhci->io_addr + reg); in uhci_writel()
605 else if (uhci_is_aspeed(uhci)) in uhci_writel()
606 writel(val, uhci->regs + uhci_aspeed_reg(reg)); in uhci_writel()
608 else if (uhci_big_endian_mmio(uhci)) in uhci_writel()
609 writel_be(val, uhci->regs + reg); in uhci_writel()
612 writel(val, uhci->regs + reg); in uhci_writel()
615 static inline u16 uhci_readw(const struct uhci_hcd *uhci, int reg) in uhci_readw() argument
617 if (uhci_has_pci_registers(uhci)) in uhci_readw()
618 return inw(uhci->io_addr + reg); in uhci_readw()
619 else if (uhci_is_aspeed(uhci)) in uhci_readw()
620 return readl(uhci->regs + uhci_aspeed_reg(reg)); in uhci_readw()
622 else if (uhci_big_endian_mmio(uhci)) in uhci_readw()
623 return readw_be(uhci->regs + reg); in uhci_readw()
626 return readw(uhci->regs + reg); in uhci_readw()
629 static inline void uhci_writew(const struct uhci_hcd *uhci, u16 val, int reg) in uhci_writew() argument
631 if (uhci_has_pci_registers(uhci)) in uhci_writew()
632 outw(val, uhci->io_addr + reg); in uhci_writew()
633 else if (uhci_is_aspeed(uhci)) in uhci_writew()
634 writel(val, uhci->regs + uhci_aspeed_reg(reg)); in uhci_writew()
636 else if (uhci_big_endian_mmio(uhci)) in uhci_writew()
637 writew_be(val, uhci->regs + reg); in uhci_writew()
640 writew(val, uhci->regs + reg); in uhci_writew()
643 static inline u8 uhci_readb(const struct uhci_hcd *uhci, int reg) in uhci_readb() argument
645 if (uhci_has_pci_registers(uhci)) in uhci_readb()
646 return inb(uhci->io_addr + reg); in uhci_readb()
647 else if (uhci_is_aspeed(uhci)) in uhci_readb()
648 return readl(uhci->regs + uhci_aspeed_reg(reg)); in uhci_readb()
650 else if (uhci_big_endian_mmio(uhci)) in uhci_readb()
651 return readb_be(uhci->regs + reg); in uhci_readb()
654 return readb(uhci->regs + reg); in uhci_readb()
657 static inline void uhci_writeb(const struct uhci_hcd *uhci, u8 val, int reg) in uhci_writeb() argument
659 if (uhci_has_pci_registers(uhci)) in uhci_writeb()
660 outb(val, uhci->io_addr + reg); in uhci_writeb()
661 else if (uhci_is_aspeed(uhci)) in uhci_writeb()
662 writel(val, uhci->regs + uhci_aspeed_reg(reg)); in uhci_writeb()
664 else if (uhci_big_endian_mmio(uhci)) in uhci_writeb()
665 writeb_be(val, uhci->regs + reg); in uhci_writeb()
668 writeb(val, uhci->regs + reg); in uhci_writeb()
682 static inline __hc32 cpu_to_hc32(const struct uhci_hcd *uhci, const u32 x) in cpu_to_hc32() argument
684 return uhci_big_endian_desc(uhci) in cpu_to_hc32()
690 static inline u32 hc32_to_cpu(const struct uhci_hcd *uhci, const __hc32 x) in hc32_to_cpu() argument
692 return uhci_big_endian_desc(uhci) in hc32_to_cpu()
699 static inline __hc32 cpu_to_hc32(const struct uhci_hcd *uhci, const u32 x) in cpu_to_hc32() argument
705 static inline u32 hc32_to_cpu(const struct uhci_hcd *uhci, const __hc32 x) in hc32_to_cpu() argument