| 337 | } |
| 338 | |
| 339 | static struct |
| 340 | fsl_qdma_queue *fsl_qdma_prep_status_queue(void) |
| 341 | { |
| 342 | struct fsl_qdma_queue *status_head; |
| 343 | unsigned int status_size; |
| 344 | |
| 345 | status_size = QDMA_STATUS_SIZE; |
| 346 | if (status_size > FSL_QDMA_CIRCULAR_DESC_SIZE_MAX || |
| 347 | status_size < FSL_QDMA_CIRCULAR_DESC_SIZE_MIN) { |
| 348 | DPAA_QDMA_ERR("Get wrong status_size."); |
| 349 | return NULL; |
| 350 | } |
| 351 | |
| 352 | status_head = rte_zmalloc("qdma: status head", sizeof(*status_head), 0); |
| 353 | if (!status_head) |
| 354 | return NULL; |
| 355 | |
| 356 | /* |
| 357 | * Buffer for queue command |
| 358 | */ |
| 359 | status_head->cq = dma_pool_alloc(sizeof(struct fsl_qdma_format) * |
| 360 | status_size, |
| 361 | sizeof(struct fsl_qdma_format) * |
| 362 | status_size, |
| 363 | &status_head->bus_addr); |
| 364 | |
| 365 | if (!status_head->cq) { |
| 366 | rte_free(status_head); |
| 367 | return NULL; |
| 368 | } |
| 369 | |
| 370 | memset(status_head->cq, 0x0, status_size * |
| 371 | sizeof(struct fsl_qdma_format)); |
| 372 | status_head->n_cq = status_size; |
| 373 | status_head->virt_head = status_head->cq; |
| 374 | |
| 375 | return status_head; |
| 376 | } |
| 377 | |
| 378 | static int |
| 379 | fsl_qdma_halt(struct fsl_qdma_engine *fsl_qdma) |
no test coverage detected