Lines Matching refs:mbxno
243 static inline void hecc_write_lam(struct ti_hecc_priv *priv, u32 mbxno, u32 val) in hecc_write_lam() argument
245 __raw_writel(val, priv->base + priv->hecc_ram_offset + mbxno * 4); in hecc_write_lam()
248 static inline void hecc_write_mbx(struct ti_hecc_priv *priv, u32 mbxno, in hecc_write_mbx() argument
251 __raw_writel(val, priv->base + priv->mbx_offset + mbxno * 0x10 + in hecc_write_mbx()
255 static inline u32 hecc_read_mbx(struct ti_hecc_priv *priv, u32 mbxno, u32 reg) in hecc_read_mbx() argument
257 return __raw_readl(priv->base + priv->mbx_offset + mbxno * 0x10 + in hecc_read_mbx()
387 u32 cnt, mbxno, mbx_mask; in ti_hecc_start() local
400 mbxno = HECC_MAX_MAILBOXES - 1 - cnt; in ti_hecc_start()
401 mbx_mask = BIT(mbxno); in ti_hecc_start()
403 hecc_write_mbx(priv, mbxno, HECC_CANMID, HECC_CANMID_AME); in ti_hecc_start()
404 hecc_write_lam(priv, mbxno, HECC_SET_REG); in ti_hecc_start()
489 u32 mbxno, mbx_mask, data; in ti_hecc_xmit() local
495 mbxno = get_tx_head_mb(priv); in ti_hecc_xmit()
496 mbx_mask = BIT(mbxno); in ti_hecc_xmit()
512 hecc_write_mbx(priv, mbxno, HECC_CANMCF, data); in ti_hecc_xmit()
518 hecc_write_mbx(priv, mbxno, HECC_CANMID, data); in ti_hecc_xmit()
519 hecc_write_mbx(priv, mbxno, HECC_CANMDL, in ti_hecc_xmit()
522 hecc_write_mbx(priv, mbxno, HECC_CANMDH, in ti_hecc_xmit()
526 can_put_echo_skb(skb, ndev, mbxno); in ti_hecc_xmit()
544 static int ti_hecc_rx_pkt(struct ti_hecc_priv *priv, int mbxno) in ti_hecc_rx_pkt() argument
560 mbx_mask = BIT(mbxno); in ti_hecc_rx_pkt()
561 data = hecc_read_mbx(priv, mbxno, HECC_CANMID); in ti_hecc_rx_pkt()
566 data = hecc_read_mbx(priv, mbxno, HECC_CANMCF); in ti_hecc_rx_pkt()
570 data = hecc_read_mbx(priv, mbxno, HECC_CANMDL); in ti_hecc_rx_pkt()
573 data = hecc_read_mbx(priv, mbxno, HECC_CANMDH); in ti_hecc_rx_pkt()
759 u32 mbxno, mbx_mask, int_status, err_status; in ti_hecc_interrupt() local
775 mbxno = get_tx_tail_mb(priv); in ti_hecc_interrupt()
776 mbx_mask = BIT(mbxno); in ti_hecc_interrupt()
784 stats->tx_bytes += hecc_read_mbx(priv, mbxno, in ti_hecc_interrupt()
788 can_get_echo_skb(ndev, mbxno); in ti_hecc_interrupt()