Lines Matching refs:mbxno
207 static inline void hecc_write_lam(struct ti_hecc_priv *priv, u32 mbxno, u32 val) in hecc_write_lam() argument
209 __raw_writel(val, priv->hecc_ram + mbxno * 4); in hecc_write_lam()
212 static inline u32 hecc_read_stamp(struct ti_hecc_priv *priv, u32 mbxno) in hecc_read_stamp() argument
214 return __raw_readl(priv->hecc_ram + HECC_CANMOTS + mbxno * 4); in hecc_read_stamp()
217 static inline void hecc_write_mbx(struct ti_hecc_priv *priv, u32 mbxno, in hecc_write_mbx() argument
220 __raw_writel(val, priv->mbx + mbxno * 0x10 + reg); in hecc_write_mbx()
223 static inline u32 hecc_read_mbx(struct ti_hecc_priv *priv, u32 mbxno, u32 reg) in hecc_read_mbx() argument
225 return __raw_readl(priv->mbx + mbxno * 0x10 + reg); in hecc_read_mbx()
355 u32 cnt, mbxno, mbx_mask; in ti_hecc_start() local
368 mbxno = HECC_MAX_MAILBOXES - 1 - cnt; in ti_hecc_start()
369 mbx_mask = BIT(mbxno); in ti_hecc_start()
371 hecc_write_mbx(priv, mbxno, HECC_CANMID, HECC_CANMID_AME); in ti_hecc_start()
372 hecc_write_lam(priv, mbxno, HECC_SET_REG); in ti_hecc_start()
469 u32 mbxno, mbx_mask, data; in ti_hecc_xmit() local
475 mbxno = get_tx_head_mb(priv); in ti_hecc_xmit()
476 mbx_mask = BIT(mbxno); in ti_hecc_xmit()
492 hecc_write_mbx(priv, mbxno, HECC_CANMCF, data); in ti_hecc_xmit()
498 hecc_write_mbx(priv, mbxno, HECC_CANMID, data); in ti_hecc_xmit()
499 hecc_write_mbx(priv, mbxno, HECC_CANMDL, in ti_hecc_xmit()
502 hecc_write_mbx(priv, mbxno, HECC_CANMDH, in ti_hecc_xmit()
506 can_put_echo_skb(skb, ndev, mbxno, 0); in ti_hecc_xmit()
529 unsigned int mbxno, u32 *timestamp, in ti_hecc_mailbox_read() argument
537 mbx_mask = BIT(mbxno); in ti_hecc_mailbox_read()
550 data = hecc_read_mbx(priv, mbxno, HECC_CANMID); in ti_hecc_mailbox_read()
556 data = hecc_read_mbx(priv, mbxno, HECC_CANMCF); in ti_hecc_mailbox_read()
561 data = hecc_read_mbx(priv, mbxno, HECC_CANMDL); in ti_hecc_mailbox_read()
564 data = hecc_read_mbx(priv, mbxno, HECC_CANMDH); in ti_hecc_mailbox_read()
568 *timestamp = hecc_read_stamp(priv, mbxno); in ti_hecc_mailbox_read()
582 if (unlikely(mbxno == HECC_RX_LAST_MBOX && in ti_hecc_mailbox_read()
672 u32 mbxno, mbx_mask, int_status, err_status, stamp; in ti_hecc_interrupt() local
740 mbxno = get_tx_tail_mb(priv); in ti_hecc_interrupt()
741 mbx_mask = BIT(mbxno); in ti_hecc_interrupt()
748 stamp = hecc_read_stamp(priv, mbxno); in ti_hecc_interrupt()
751 mbxno, stamp, NULL); in ti_hecc_interrupt()