Lines Matching full:dcb
89 /* Barrier to force memory writes to DCB to be completed before starting in ocelot_fdma_activate_chan()
110 static void ocelot_fdma_dcb_set_data(struct ocelot_fdma_dcb *dcb, in ocelot_fdma_dcb_set_data() argument
116 dcb->llp = 0; in ocelot_fdma_dcb_set_data()
117 dcb->datap = ALIGN_DOWN(dma_addr, 4); in ocelot_fdma_dcb_set_data()
118 dcb->datal = ALIGN_DOWN(size, 4); in ocelot_fdma_dcb_set_data()
119 dcb->stat = MSCC_FDMA_DCB_STAT_BLOCKO(offset); in ocelot_fdma_dcb_set_data()
151 struct ocelot_fdma_dcb *dcb; in ocelot_fdma_alloc_rx_buffs() local
171 dcb = &rx_ring->dcbs[idx]; in ocelot_fdma_alloc_rx_buffs()
173 ocelot_fdma_dcb_set_data(dcb, dma_addr, OCELOT_FDMA_RXB_SIZE); in ocelot_fdma_alloc_rx_buffs()
176 /* Chain the DCB to the next one */ in ocelot_fdma_alloc_rx_buffs()
177 dcb->llp = ocelot_fdma_idx_dma(rx_ring->dcbs_dma, idx); in ocelot_fdma_alloc_rx_buffs()
188 struct ocelot_fdma_dcb *dcb, in ocelot_fdma_tx_dcb_set_skb() argument
200 ocelot_fdma_dcb_set_data(dcb, mapping, OCELOT_FDMA_RX_SIZE); in ocelot_fdma_tx_dcb_set_skb()
202 dcb->stat |= MSCC_FDMA_DCB_STAT_BLOCKL(skb->len); in ocelot_fdma_tx_dcb_set_skb()
203 dcb->stat |= MSCC_FDMA_DCB_STAT_SOF | MSCC_FDMA_DCB_STAT_EOF; in ocelot_fdma_tx_dcb_set_skb()
212 /* Check if the FDMA hits the DCB with LLP == NULL */ in ocelot_fdma_check_stop_rx()
225 struct ocelot_fdma_dcb *dcb; in ocelot_fdma_rx_set_llp() local
230 dcb = &rx_ring->dcbs[idx]; in ocelot_fdma_rx_set_llp()
231 dcb->llp = 0; in ocelot_fdma_rx_set_llp()
254 /* FDMA stopped on the last DCB that contained a NULL LLP, since in ocelot_fdma_rx_restart()
256 * DCB_LLP to point to the next DCB in ocelot_fdma_rx_restart()
261 /* Get the next DMA addr located after LLP == NULL DCB */ in ocelot_fdma_rx_restart()
339 /* Reuse the free half of the page for the next_to_alloc DCB*/ in ocelot_fdma_get_skb()
394 struct ocelot_fdma_dcb *dcb; in ocelot_fdma_rx_get() local
407 dcb = &rx_ring->dcbs[idx]; in ocelot_fdma_rx_get()
408 stat = dcb->stat; in ocelot_fdma_rx_get()
435 "DCB aborted or pruned\n"); in ocelot_fdma_rx_get()
487 struct ocelot_fdma_dcb *dcb; in ocelot_fdma_tx_cleanup() local
502 dcb = &tx_ring->dcbs[ntc]; in ocelot_fdma_tx_cleanup()
503 if (!(dcb->stat & MSCC_FDMA_DCB_STAT_PD)) in ocelot_fdma_tx_cleanup()
511 dcb_llp = dcb->llp; in ocelot_fdma_tx_cleanup()
513 /* Only update after accessing all dcb fields */ in ocelot_fdma_tx_cleanup()
541 /* Set NULL LLP to be the last DCB used */ in ocelot_fdma_tx_cleanup()
544 dcb = &tx_ring->dcbs[new_null_llp_idx]; in ocelot_fdma_tx_cleanup()
545 dcb->llp = 0; in ocelot_fdma_tx_cleanup()
612 struct ocelot_fdma_dcb *dcb; in ocelot_fdma_send_skb() local
616 dcb = &tx_ring->dcbs[tx_ring->next_to_use]; in ocelot_fdma_send_skb()
618 if (!ocelot_fdma_tx_dcb_set_skb(ocelot, tx_buf, dcb, skb)) { in ocelot_fdma_send_skb()
627 /* If the FDMA TX chan is empty, then enqueue the DCB directly */ in ocelot_fdma_send_skb()
634 dcb->llp = ocelot_fdma_idx_dma(tx_ring->dcbs_dma, next_idx); in ocelot_fdma_send_skb()
781 /* Set the last DCB LLP as NULL, this is normally done when restarting in ocelot_fdma_rings_alloc()