Lines Matching refs:musb
52 static void pic32_musb_disable(struct musb *musb) in pic32_musb_disable() argument
57 static int pic32_musb_enable(struct musb *musb) in pic32_musb_enable() argument
60 musb_writeb(musb->mregs, MUSB_SOFTRST, MUSB_SOFTRST_NRSTX); in pic32_musb_enable()
62 musb_platform_set_mode(musb, musb->board_mode); in pic32_musb_enable()
69 struct musb *musb = hci; in pic32_interrupt() local
74 musb->int_usb = musb_readb(musb->mregs, MUSB_INTRUSB); in pic32_interrupt()
75 if (musb->int_usb) in pic32_interrupt()
76 musb_writeb(musb->mregs, MUSB_INTRUSB, musb->int_usb); in pic32_interrupt()
79 musb->int_rx = musb_readw(musb->mregs, MUSB_INTRRX) & PIC32_RX_EP_MASK; in pic32_interrupt()
80 if (musb->int_rx) in pic32_interrupt()
81 musb_writew(musb->mregs, MUSB_INTRRX, musb->int_rx); in pic32_interrupt()
83 musb->int_tx = musb_readw(musb->mregs, MUSB_INTRTX) & PIC32_TX_EP_MASK; in pic32_interrupt()
84 if (musb->int_tx) in pic32_interrupt()
85 musb_writew(musb->mregs, MUSB_INTRTX, musb->int_tx); in pic32_interrupt()
88 if (musb->int_usb & MUSB_INTR_DISCONNECT) { in pic32_interrupt()
89 musb->int_tx = 0; in pic32_interrupt()
90 musb->int_rx = 0; in pic32_interrupt()
93 if (musb->int_tx || musb->int_rx || musb->int_usb) in pic32_interrupt()
94 ret = musb_interrupt(musb); in pic32_interrupt()
99 static int pic32_musb_set_mode(struct musb *musb, u8 mode) in pic32_musb_set_mode() argument
101 struct device *dev = musb->controller; in pic32_musb_set_mode()
124 static int pic32_musb_init(struct musb *musb) in pic32_musb_init() argument
126 struct pic32_musb_data *pdata = to_pic32_musb_data(musb->controller); in pic32_musb_init()
131 hwvers = musb_read_hwvers(musb->mregs); in pic32_musb_init()
136 power = musb_readb(musb->mregs, MUSB_POWER); in pic32_musb_init()
138 musb_writeb(musb->mregs, MUSB_POWER, power); in pic32_musb_init()
143 musb_writeb(musb->mregs, MUSB_POWER, power); in pic32_musb_init()
145 musb->isr = pic32_interrupt; in pic32_musb_init()