• Home
  • Raw
  • Download

Lines Matching refs:regs

53 	struct mscan_regs __iomem *regs = priv->reg_base;  in mscan_set_mode()  local
61 out_8(&regs->cantarq, priv->tx_active); in mscan_set_mode()
63 out_8(&regs->cantier, 0); in mscan_set_mode()
66 canctl1 = in_8(&regs->canctl1); in mscan_set_mode()
68 setbits8(&regs->canctl0, MSCAN_SLPRQ); in mscan_set_mode()
70 if (in_8(&regs->canctl1) & MSCAN_SLPAK) in mscan_set_mode()
94 setbits8(&regs->canctl0, MSCAN_INITRQ); in mscan_set_mode()
96 if (in_8(&regs->canctl1) & MSCAN_INITAK) in mscan_set_mode()
106 setbits8(&regs->canctl0, MSCAN_CSWAI); in mscan_set_mode()
109 canctl1 = in_8(&regs->canctl1); in mscan_set_mode()
111 clrbits8(&regs->canctl0, MSCAN_SLPRQ | MSCAN_INITRQ); in mscan_set_mode()
113 canctl1 = in_8(&regs->canctl1); in mscan_set_mode()
129 struct mscan_regs __iomem *regs = priv->reg_base; in mscan_start() local
133 out_8(&regs->canrier, 0); in mscan_start()
144 if (in_8(&regs->canmisc) & MSCAN_BOHOLD) in mscan_start()
145 out_8(&regs->canmisc, MSCAN_BOHOLD); in mscan_start()
152 canrflg = in_8(&regs->canrflg); in mscan_start()
156 out_8(&regs->cantier, 0); in mscan_start()
159 out_8(&regs->canrier, MSCAN_RX_INTS_ENABLE); in mscan_start()
169 struct mscan_regs __iomem *regs = priv->reg_base; in mscan_restart() local
172 WARN(!(in_8(&regs->canmisc) & MSCAN_BOHOLD), in mscan_restart()
174 out_8(&regs->canmisc, MSCAN_BOHOLD); in mscan_restart()
176 out_8(&regs->canrier, MSCAN_RX_INTS_ENABLE); in mscan_restart()
190 struct mscan_regs __iomem *regs = priv->reg_base; in mscan_start_xmit() local
197 out_8(&regs->cantier, 0); in mscan_start_xmit()
225 out_8(&regs->cantbsel, i); in mscan_start_xmit()
235 out_be16(&regs->tx.idr3_2, can_id); in mscan_start_xmit()
247 out_be16(&regs->tx.idr1_0, can_id); in mscan_start_xmit()
250 void __iomem *data = &regs->tx.dsr1_0; in mscan_start_xmit()
262 out_8(&regs->tx.dlr, frame->len); in mscan_start_xmit()
263 out_8(&regs->tx.tbpr, priv->cur_pri); in mscan_start_xmit()
266 out_8(&regs->cantflg, 1 << buf_id); in mscan_start_xmit()
277 out_8(&regs->cantier, priv->tx_active); in mscan_start_xmit()
296 struct mscan_regs __iomem *regs = priv->reg_base; in mscan_get_rx_frame() local
300 can_id = in_be16(&regs->rx.idr1_0); in mscan_get_rx_frame()
303 can_id = ((can_id << 16) | in_be16(&regs->rx.idr3_2)); in mscan_get_rx_frame()
315 frame->len = can_cc_dlc2len(in_8(&regs->rx.dlr) & 0xf); in mscan_get_rx_frame()
318 void __iomem *data = &regs->rx.dsr1_0; in mscan_get_rx_frame()
330 out_8(&regs->canrflg, MSCAN_RXF); in mscan_get_rx_frame()
337 struct mscan_regs __iomem *regs = priv->reg_base; in mscan_get_err_frame() local
366 out_8(&regs->cantier, 0); in mscan_get_err_frame()
367 out_8(&regs->canrier, 0); in mscan_get_err_frame()
368 setbits8(&regs->canctl0, in mscan_get_err_frame()
376 out_8(&regs->canrflg, MSCAN_ERR_IF); in mscan_get_err_frame()
383 struct mscan_regs __iomem *regs = priv->reg_base; in mscan_rx_poll() local
391 canrflg = in_8(&regs->canrflg); in mscan_rx_poll()
400 out_8(&regs->canrflg, canrflg); in mscan_rx_poll()
421 out_8(&regs->canrier, priv->shadow_canrier); in mscan_rx_poll()
431 struct mscan_regs __iomem *regs = priv->reg_base; in mscan_isr() local
436 cantier = in_8(&regs->cantier) & MSCAN_TXE; in mscan_isr()
437 cantflg = in_8(&regs->cantflg) & cantier; in mscan_isr()
450 out_8(&regs->cantbsel, mask); in mscan_isr()
469 out_8(&regs->cantier, priv->tx_active); in mscan_isr()
473 canrflg = in_8(&regs->canrflg); in mscan_isr()
477 priv->shadow_canrier = in_8(&regs->canrier); in mscan_isr()
478 out_8(&regs->canrier, 0); in mscan_isr()
511 struct mscan_regs __iomem *regs = priv->reg_base; in mscan_do_set_bittiming() local
522 out_8(&regs->canbtr0, btr0); in mscan_do_set_bittiming()
523 out_8(&regs->canbtr1, btr1); in mscan_do_set_bittiming()
532 struct mscan_regs __iomem *regs = priv->reg_base; in mscan_get_berr_counter() local
534 bec->txerr = in_8(&regs->cantxerr); in mscan_get_berr_counter()
535 bec->rxerr = in_8(&regs->canrxerr); in mscan_get_berr_counter()
544 struct mscan_regs __iomem *regs = priv->reg_base; in mscan_open() local
567 setbits8(&regs->canctl1, MSCAN_LISTEN); in mscan_open()
569 clrbits8(&regs->canctl1, MSCAN_LISTEN); in mscan_open()
595 struct mscan_regs __iomem *regs = priv->reg_base; in mscan_close() local
600 out_8(&regs->cantier, 0); in mscan_close()
601 out_8(&regs->canrier, 0); in mscan_close()
626 struct mscan_regs __iomem *regs = priv->reg_base; in register_mscandev() local
629 ctl1 = in_8(&regs->canctl1); in register_mscandev()
641 out_8(&regs->canctl1, ctl1); in register_mscandev()
645 out_be16(&regs->canidar1_0, 0); in register_mscandev()
646 out_be16(&regs->canidar3_2, 0); in register_mscandev()
647 out_be16(&regs->canidar5_4, 0); in register_mscandev()
648 out_be16(&regs->canidar7_6, 0); in register_mscandev()
650 out_be16(&regs->canidmr1_0, 0xffff); in register_mscandev()
651 out_be16(&regs->canidmr3_2, 0xffff); in register_mscandev()
652 out_be16(&regs->canidmr5_4, 0xffff); in register_mscandev()
653 out_be16(&regs->canidmr7_6, 0xffff); in register_mscandev()
655 out_8(&regs->canidac, MSCAN_AF_32BIT); in register_mscandev()
665 struct mscan_regs __iomem *regs = priv->reg_base; in unregister_mscandev() local
667 clrbits8(&regs->canctl1, MSCAN_CANE); in unregister_mscandev()