Lines Matching refs:musb
181 struct musb *musb = __hci; in mtk_musb_interrupt() local
185 musb->int_usb = musb_readb(musb->mregs, MUSB_INTRUSB); in mtk_musb_interrupt()
187 if (musb->int_usb) in mtk_musb_interrupt()
188 musb_writeb(musb->mregs, MUSB_INTRUSB, musb->int_usb); in mtk_musb_interrupt()
189 musb->int_tx = musb_readw(musb->mregs, MUSB_INTRTX); in mtk_musb_interrupt()
190 if (musb->int_tx) in mtk_musb_interrupt()
191 musb_writew(musb->mregs, MUSB_INTRTX, musb->int_tx); in mtk_musb_interrupt()
192 musb->int_rx = musb_readw(musb->mregs, MUSB_INTRRX); in mtk_musb_interrupt()
193 if (musb->int_rx) in mtk_musb_interrupt()
194 musb_writew(musb->mregs, MUSB_INTRRX, musb->int_rx); in mtk_musb_interrupt()
196 if (musb->int_usb || musb->int_tx || musb->int_rx) in mtk_musb_interrupt()
197 retval |= musb_interrupt(musb); in mtk_musb_interrupt()
205 static int mtk_musb_enable(struct musb *musb) in mtk_musb_enable() argument
207 struct mtk_musb_glue *glue = to_mtk_musb_glue(musb->controller); in mtk_musb_enable()
211 musb_ep_select(musb->mregs, 0); in mtk_musb_enable()
212 musb_writeb(musb->mregs, MUSB_FADDR, 0); in mtk_musb_enable()
224 static void mtk_musb_disable(struct musb *musb) in mtk_musb_disable() argument
226 struct mtk_musb_glue *glue = to_mtk_musb_glue(musb->controller); in mtk_musb_disable()
239 static int mtk_musb_init(struct musb *musb) in mtk_musb_init() argument
241 struct mtk_musb_glue *glue = to_mtk_musb_glue(musb->controller); in mtk_musb_init()
248 dev_err(musb->controller, "failed to enable usbpll clock\n"); in mtk_musb_init()
253 dev_err(musb->controller, "failed to enable usbmcu clock\n"); in mtk_musb_init()
258 dev_err(musb->controller, "failed to enable usb clock\n"); in mtk_musb_init()
262 musb->isr = mtk_musb_interrupt; in mtk_musb_init()
267 static int mtk_musb_exit(struct musb *musb) in mtk_musb_exit() argument
269 struct mtk_musb_glue *glue = to_mtk_musb_glue(musb->controller); in mtk_musb_exit()