Lines Matching refs:wrp
104 const struct dsps_musb_wrapper *wrp; /* wrapper register offsets */ member
139 wait = msecs_to_jiffies(glue->wrp->poll_timeout); in dsps_mod_timer()
171 const struct dsps_musb_wrapper *wrp = glue->wrp; in dsps_musb_enable() local
176 epmask = ((musb->epmask & wrp->txep_mask) << wrp->txep_shift) | in dsps_musb_enable()
177 ((musb->epmask & wrp->rxep_mask) << wrp->rxep_shift); in dsps_musb_enable()
178 coremask = (wrp->usb_bitmap & ~MUSB_INTR_SOF); in dsps_musb_enable()
180 musb_writel(reg_base, wrp->epintr_set, epmask); in dsps_musb_enable()
181 musb_writel(reg_base, wrp->coreintr_set, coremask); in dsps_musb_enable()
197 const struct dsps_musb_wrapper *wrp = glue->wrp; in dsps_musb_disable() local
200 musb_writel(reg_base, wrp->coreintr_clear, wrp->usb_bitmap); in dsps_musb_disable()
201 musb_writel(reg_base, wrp->epintr_clear, in dsps_musb_disable()
202 wrp->txep_bitmap | wrp->rxep_bitmap); in dsps_musb_disable()
212 const struct dsps_musb_wrapper *wrp = glue->wrp; in dsps_check_status() local
268 musb_writel(musb->ctrl_base, wrp->coreintr_set, in dsps_check_status()
269 MUSB_INTR_VBUSERROR << wrp->usb_shift); in dsps_check_status()
306 const struct dsps_musb_wrapper *wrp = glue->wrp; in dsps_musb_clear_ep_rxintr() local
309 epintr = (1 << epnum) << wrp->rxep_shift; in dsps_musb_clear_ep_rxintr()
310 musb_writel(musb->ctrl_base, wrp->epintr_status, epintr); in dsps_musb_clear_ep_rxintr()
319 const struct dsps_musb_wrapper *wrp = glue->wrp; in dsps_interrupt() local
327 epintr = musb_readl(reg_base, wrp->epintr_status); in dsps_interrupt()
328 musb->int_rx = (epintr & wrp->rxep_bitmap) >> wrp->rxep_shift; in dsps_interrupt()
329 musb->int_tx = (epintr & wrp->txep_bitmap) >> wrp->txep_shift; in dsps_interrupt()
332 musb_writel(reg_base, wrp->epintr_status, epintr); in dsps_interrupt()
335 usbintr = musb_readl(reg_base, wrp->coreintr_status); in dsps_interrupt()
339 musb->int_usb = (usbintr & wrp->usb_bitmap) >> wrp->usb_shift; in dsps_interrupt()
341 musb_writel(reg_base, wrp->coreintr_status, usbintr); in dsps_interrupt()
346 if (usbintr & ((1 << wrp->drvvbus) << wrp->usb_shift)) { in dsps_interrupt()
347 int drvvbus = musb_readl(reg_base, wrp->status); in dsps_interrupt()
429 const struct dsps_musb_wrapper *wrp = glue->wrp; in dsps_musb_init() local
449 rev = musb_readl(reg_base, wrp->revision); in dsps_musb_init()
469 musb_writel(reg_base, wrp->control, (1 << wrp->reset)); in dsps_musb_init()
474 val = musb_readl(reg_base, wrp->phy_utmi); in dsps_musb_init()
475 val &= ~(1 << wrp->otg_disable); in dsps_musb_init()
476 musb_writel(musb->ctrl_base, wrp->phy_utmi, val); in dsps_musb_init()
513 const struct dsps_musb_wrapper *wrp = glue->wrp; in dsps_musb_set_mode() local
517 reg = musb_readl(ctrl_base, wrp->mode); in dsps_musb_set_mode()
521 reg &= ~(1 << wrp->iddig); in dsps_musb_set_mode()
528 reg |= (1 << wrp->iddig_mux); in dsps_musb_set_mode()
530 musb_writel(ctrl_base, wrp->mode, reg); in dsps_musb_set_mode()
531 musb_writel(ctrl_base, wrp->phy_utmi, 0x02); in dsps_musb_set_mode()
534 reg |= (1 << wrp->iddig); in dsps_musb_set_mode()
541 reg |= (1 << wrp->iddig_mux); in dsps_musb_set_mode()
543 musb_writel(ctrl_base, wrp->mode, reg); in dsps_musb_set_mode()
546 musb_writel(ctrl_base, wrp->phy_utmi, 0x02); in dsps_musb_set_mode()
866 const struct dsps_musb_wrapper *wrp; in dsps_probe() local
878 wrp = match->data; in dsps_probe()
889 glue->wrp = wrp; in dsps_probe()
970 const struct dsps_musb_wrapper *wrp = glue->wrp; in dsps_suspend() local
988 glue->context.control = musb_readl(mbase, wrp->control); in dsps_suspend()
989 glue->context.epintr = musb_readl(mbase, wrp->epintr_set); in dsps_suspend()
990 glue->context.coreintr = musb_readl(mbase, wrp->coreintr_set); in dsps_suspend()
991 glue->context.phy_utmi = musb_readl(mbase, wrp->phy_utmi); in dsps_suspend()
992 glue->context.mode = musb_readl(mbase, wrp->mode); in dsps_suspend()
993 glue->context.tx_mode = musb_readl(mbase, wrp->tx_mode); in dsps_suspend()
994 glue->context.rx_mode = musb_readl(mbase, wrp->rx_mode); in dsps_suspend()
1004 const struct dsps_musb_wrapper *wrp = glue->wrp; in dsps_resume() local
1014 musb_writel(mbase, wrp->control, glue->context.control); in dsps_resume()
1015 musb_writel(mbase, wrp->epintr_set, glue->context.epintr); in dsps_resume()
1016 musb_writel(mbase, wrp->coreintr_set, glue->context.coreintr); in dsps_resume()
1017 musb_writel(mbase, wrp->phy_utmi, glue->context.phy_utmi); in dsps_resume()
1018 musb_writel(mbase, wrp->mode, glue->context.mode); in dsps_resume()
1019 musb_writel(mbase, wrp->tx_mode, glue->context.tx_mode); in dsps_resume()
1020 musb_writel(mbase, wrp->rx_mode, glue->context.rx_mode); in dsps_resume()