src/dpdk/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
static int
fpga_queue_start(struct rte_bbdev *dev, uint16_t queue_id)
{
	struct fpga_5gnr_fec_device *d = dev->data->dev_private;
#ifdef RTE_LIBRTE_BBDEV_DEBUG
	if (d == NULL) {
		rte_bbdev_log(ERR, "Invalid device pointer");
		return -1;
	}
#endif
	struct fpga_queue *q = dev->data->queues[queue_id].queue_private;
	uint32_t offset = FPGA_5GNR_FEC_RING_CTRL_REGS +
			(sizeof(struct fpga_ring_ctrl_reg) * q->q_idx);
	uint8_t enable = 0x01;
	uint16_t zero = 0x0000;

	/* Clear queue head and tail variables */
	q->tail = q->head_free_desc = 0;

	/* Clear FPGA head_point and tail registers */
	fpga_reg_write_16(d->mmio_base, offset + FPGA_5GNR_FEC_RING_HEAD_POINT,
			zero);
	fpga_reg_write_16(d->mmio_base, offset + FPGA_5GNR_FEC_RING_SHADOW_TAIL,
			zero);

	/* Enable queue */
	fpga_reg_write_8(d->mmio_base, offset + FPGA_5GNR_FEC_RING_ENABLE,
			enable);

	rte_bbdev_log_debug("FPGA Queue[%d] started", queue_id);
	return 0;
}
/* Function starts a device queue. */
Function starts a device queue.
Function starts a device queue .
static int
fpga_queue_start(struct rte_bbdev *dev, uint16_t queue_id)
{
	struct fpga_5gnr_fec_device *d = dev->data->dev_private;
#ifdef RTE_LIBRTE_BBDEV_DEBUG
	if (d == NULL) {
		rte_bbdev_log(ERR, "Invalid device pointer");
		return -1;
	}
#endif
	struct fpga_queue *q = dev->data->queues[queue_id].queue_private;
	uint32_t offset = FPGA_5GNR_FEC_RING_CTRL_REGS +
			(sizeof(struct fpga_ring_ctrl_reg) * q->q_idx);
	uint8_t enable = 0x01;
	uint16_t zero = 0x0000;
	q->tail = q->head_free_desc = 0;
	fpga_reg_write_16(d->mmio_base, offset + FPGA_5GNR_FEC_RING_HEAD_POINT,
			zero);
	fpga_reg_write_16(d->mmio_base, offset + FPGA_5GNR_FEC_RING_SHADOW_TAIL,
			zero);
	fpga_reg_write_8(d->mmio_base, offset + FPGA_5GNR_FEC_RING_ENABLE,
			enable);
	rte_bbdev_log_debug("FPGA Queue[%d] started", queue_id);
	return 0;
}
static int fpga_queue_start ( struct rte_bbdev * dev , uint16_t queue_id ) { struct fpga_5gnr_fec_device * d = dev -> data -> dev_private ; #ifdef RTE_LIBRTE_BBDEV_DEBUG if ( d == NULL ) { rte_bbdev_log ( ERR , " " ) ; return -1 ; } #endif struct fpga_queue * q = dev -> data -> queues [ queue_id ] . queue_private ; uint32_t offset = FPGA_5GNR_FEC_RING_CTRL_REGS + ( sizeof ( struct fpga_ring_ctrl_reg ) * q -> q_idx ) ; uint8_t enable = 0x01 ; uint16_t zero = 0x0000 ; q -> tail = q -> head_free_desc = 0 ; fpga_reg_write_16 ( d -> mmio_base , offset + FPGA_5GNR_FEC_RING_HEAD_POINT , zero ) ; fpga_reg_write_16 ( d -> mmio_base , offset + FPGA_5GNR_FEC_RING_SHADOW_TAIL , zero ) ; fpga_reg_write_8 ( d -> mmio_base , offset + FPGA_5GNR_FEC_RING_ENABLE , enable ) ; rte_bbdev_log_debug ( " " , queue_id ) ; return 0 ; }
Function starts a device queue.
Function starts a device queue .
/* Clear queue head and tail variables */ /* Clear FPGA head_point and tail registers */ /* Enable queue */