Lines Matching refs:isp1362_hcd
431 struct isp1362_hcd { struct
508 static inline void ALIGNSTAT(struct isp1362_hcd *isp1362_hcd, void *ptr) in ALIGNSTAT() argument
512 isp1362_hcd->stat16++; in ALIGNSTAT()
514 isp1362_hcd->stat8++; in ALIGNSTAT()
516 isp1362_hcd->stat4++; in ALIGNSTAT()
518 isp1362_hcd->stat2++; in ALIGNSTAT()
520 isp1362_hcd->stat1++; in ALIGNSTAT()
523 static inline struct isp1362_hcd *hcd_to_isp1362_hcd(struct usb_hcd *hcd) in hcd_to_isp1362_hcd()
525 return (struct isp1362_hcd *) (hcd->hcd_priv); in hcd_to_isp1362_hcd()
528 static inline struct usb_hcd *isp1362_hcd_to_hcd(struct isp1362_hcd *isp1362_hcd) in isp1362_hcd_to_hcd() argument
530 return container_of((void *)isp1362_hcd, struct usb_hcd, hcd_priv); in isp1362_hcd_to_hcd()
585 static void isp1362_write_addr(struct isp1362_hcd *isp1362_hcd, isp1362_reg_t reg) in isp1362_write_addr() argument
589 writew(ISP1362_REG_NO(reg), isp1362_hcd->addr_reg); in isp1362_write_addr()
591 isp1362_delay(isp1362_hcd, 1); in isp1362_write_addr()
594 static void isp1362_write_data16(struct isp1362_hcd *isp1362_hcd, u16 val) in isp1362_write_data16() argument
597 writew(val, isp1362_hcd->data_reg); in isp1362_write_data16()
600 static u16 isp1362_read_data16(struct isp1362_hcd *isp1362_hcd) in isp1362_read_data16() argument
605 val = readw(isp1362_hcd->data_reg); in isp1362_read_data16()
610 static void isp1362_write_data32(struct isp1362_hcd *isp1362_hcd, u32 val) in isp1362_write_data32() argument
614 writel(val, isp1362_hcd->data_reg); in isp1362_write_data32()
617 writew((u16)val, isp1362_hcd->data_reg); in isp1362_write_data32()
619 writew(val >> 16, isp1362_hcd->data_reg); in isp1362_write_data32()
623 static u32 isp1362_read_data32(struct isp1362_hcd *isp1362_hcd) in isp1362_read_data32() argument
629 val = readl(isp1362_hcd->data_reg); in isp1362_read_data32()
632 val = (u32)readw(isp1362_hcd->data_reg); in isp1362_read_data32()
634 val |= (u32)readw(isp1362_hcd->data_reg) << 16; in isp1362_read_data32()
641 static void isp1362_read_fifo(struct isp1362_hcd *isp1362_hcd, void *buf, u16 len) in isp1362_read_fifo() argument
653 readsl(isp1362_hcd->data_reg, dp, len >> 2); in isp1362_read_fifo()
660 insw((unsigned long)isp1362_hcd->data_reg, dp, len >> 1); in isp1362_read_fifo()
667 data = isp1362_read_data16(isp1362_hcd); in isp1362_read_fifo()
674 static void isp1362_write_fifo(struct isp1362_hcd *isp1362_hcd, void *buf, u16 len) in isp1362_write_fifo() argument
687 isp1362_write_data16(isp1362_hcd, data); in isp1362_write_fifo()
690 isp1362_write_data16(isp1362_hcd, *dp); in isp1362_write_fifo()
698 writesl(isp1362_hcd->data_reg, dp, len >> 2); in isp1362_write_fifo()
705 outsw((unsigned long)isp1362_hcd->data_reg, dp, len >> 1); in isp1362_write_fifo()
718 isp1362_write_data16(isp1362_hcd, data); in isp1362_write_fifo()
795 static void isp1362_write_diraddr(struct isp1362_hcd *isp1362_hcd, u16 offset, u16 len) in isp1362_write_diraddr() argument
799 isp1362_clr_mask16(isp1362_hcd, HCDMACFG, HCDMACFG_CTR_ENABLE); in isp1362_write_diraddr()
800 isp1362_write_reg32(isp1362_hcd, HCDIRADDR, in isp1362_write_diraddr()
804 static void isp1362_read_buffer(struct isp1362_hcd *isp1362_hcd, void *buf, u16 offset, int len) in isp1362_read_buffer() argument
806 isp1362_write_diraddr(isp1362_hcd, offset, len); in isp1362_read_buffer()
811 isp1362_write_reg16(isp1362_hcd, HCuPINT, HCuPINT_EOT); in isp1362_read_buffer()
813 isp1362_write_addr(isp1362_hcd, ISP1362_REG_HCDIRDATA); in isp1362_read_buffer()
815 isp1362_read_fifo(isp1362_hcd, buf, len); in isp1362_read_buffer()
816 isp1362_write_reg16(isp1362_hcd, HCuPINT, HCuPINT_EOT); in isp1362_read_buffer()
819 static void isp1362_write_buffer(struct isp1362_hcd *isp1362_hcd, void *buf, u16 offset, int len) in isp1362_write_buffer() argument
821 isp1362_write_diraddr(isp1362_hcd, offset, len); in isp1362_write_buffer()
826 isp1362_write_reg16(isp1362_hcd, HCuPINT, HCuPINT_EOT); in isp1362_write_buffer()
828 isp1362_write_addr(isp1362_hcd, ISP1362_REG_HCDIRDATA | ISP1362_REG_WRITE_OFFSET); in isp1362_write_buffer()
829 isp1362_write_fifo(isp1362_hcd, buf, len); in isp1362_write_buffer()
831 isp1362_write_reg16(isp1362_hcd, HCuPINT, HCuPINT_EOT); in isp1362_write_buffer()