Lines Matching refs:ov

100 static ktime_t acc_ts2ktime(struct acc_ov *ov, u64 ts)  in acc_ts2ktime()  argument
112 void acc_init_ov(struct acc_ov *ov, struct device *dev) in acc_init_ov() argument
116 temp = acc_ov_read32(ov, ACC_OV_OF_VERSION); in acc_init_ov()
117 ov->version = temp; in acc_init_ov()
118 ov->features = (temp >> 16); in acc_init_ov()
120 temp = acc_ov_read32(ov, ACC_OV_OF_INFO); in acc_init_ov()
121 ov->total_cores = temp; in acc_init_ov()
122 ov->active_cores = (temp >> 8); in acc_init_ov()
124 ov->core_frequency = acc_ov_read32(ov, ACC_OV_OF_CANCORE_FREQ); in acc_init_ov()
125 ov->timestamp_frequency = acc_ov_read32(ov, ACC_OV_OF_TS_FREQ_LO); in acc_init_ov()
130 if (ov->features & ACC_OV_REG_FEAT_MASK_NEW_PSC) { in acc_init_ov()
131 acc_ov_set_bits(ov, ACC_OV_OF_MODE, in acc_init_ov()
134 ov->core_frequency /= 2; in acc_init_ov()
139 ov->version, ov->core_frequency, ov->timestamp_frequency, in acc_init_ov()
140 ov->features, acc_ov_read32(ov, ACC_OV_OF_INFO) >> 16, in acc_init_ov()
141 ov->active_cores, ov->total_cores); in acc_init_ov()
144 void acc_init_bm_ptr(struct acc_ov *ov, struct acc_core *cores, const void *mem) in acc_init_bm_ptr() argument
162 ov->bmfifo.messages = mem; in acc_init_bm_ptr()
163 ov->bmfifo.irq_cnt = mem + (ov->total_cores + 1U) * ACC_CORE_DMABUF_SIZE; in acc_init_bm_ptr()
165 for (u = 0U; u < ov->active_cores; u++) { in acc_init_bm_ptr()
169 core->bmfifo.irq_cnt = ov->bmfifo.irq_cnt + (u + 1U); in acc_init_bm_ptr()
365 if (priv->ov->features & ACC_OV_REG_FEAT_MASK_CANFD) { in acc_set_bittiming()
425 acc_ts2ktime(priv->ov, msg->ts); in handle_core_msg_rxtxdone()
460 skb_hwtstamps(skb)->hwtstamp = acc_ts2ktime(priv->ov, msg->ts); in handle_core_msg_rxtxdone()
519 skb_hwtstamps(skb)->hwtstamp = acc_ts2ktime(priv->ov, msg->ts); in handle_core_msg_overrun()
576 skb_hwtstamps(skb)->hwtstamp = acc_ts2ktime(priv->ov, msg->ts); in handle_core_msg_buserr()
629 skb_hwtstamps(skb)->hwtstamp = acc_ts2ktime(priv->ov, msg->ts); in handle_core_msg_errstatechange()
716 irqreturn_t acc_card_interrupt(struct acc_ov *ov, struct acc_core *cores) in acc_card_interrupt() argument
727 if (READ_ONCE(*ov->bmfifo.irq_cnt) != ov->bmfifo.local_irq_cnt) { in acc_card_interrupt()
729 ov->bmfifo.local_irq_cnt = READ_ONCE(*ov->bmfifo.irq_cnt); in acc_card_interrupt()
732 for (i = 0; i < ov->active_cores; i++) { in acc_card_interrupt()
748 acc_ov_write32(ov, ACC_OV_OF_BM_IRQ_MASK, irqmask); in acc_card_interrupt()
752 acc_ov_write32(ov, ACC_OV_OF_BM_IRQ_COUNTER, in acc_card_interrupt()
753 ov->bmfifo.local_irq_cnt); in acc_card_interrupt()
756 for (i = 0; i < ov->active_cores; i++) { in acc_card_interrupt()
766 acc_ov_write32(ov, ACC_OV_OF_BM_IRQ_MASK, ACC_BM_IRQ_UNMASK_ALL); in acc_card_interrupt()