Lines Matching full:qmgr
236 id = inst->id - inst->qmgr->start_queue; in __knav_queue_open()
237 qh->reg_push = &inst->qmgr->reg_push[id]; in __knav_queue_open()
238 qh->reg_pop = &inst->qmgr->reg_pop[id]; in __knav_queue_open()
239 qh->reg_peek = &inst->qmgr->reg_peek[id]; in __knav_queue_open()
507 unsigned id = inst->id - inst->qmgr->start_queue; in knav_queue_flush()
510 writel_relaxed(0, &inst->qmgr->reg_push[id].ptr_size_thresh); in knav_queue_flush()
987 struct knav_qmgr_info *qmgr; in knav_queue_setup_region() local
1048 for_each_qmgr(kdev, qmgr) { in knav_queue_setup_region()
1049 regs = qmgr->reg_region + id; in knav_queue_setup_region()
1186 struct knav_qmgr_info *qmgr; in knav_queue_setup_link_ram() local
1188 for_each_qmgr(kdev, qmgr) { in knav_queue_setup_link_ram()
1192 writel_relaxed((u32)block->dma, &qmgr->reg_config->link_ram_base0); in knav_queue_setup_link_ram()
1195 &qmgr->reg_config->link_ram_size0); in knav_queue_setup_link_ram()
1198 &qmgr->reg_config->link_ram_size0); in knav_queue_setup_link_ram()
1205 writel_relaxed(block->dma, &qmgr->reg_config->link_ram_base1); in knav_queue_setup_link_ram()
1216 struct knav_qmgr_info *qmgr; in knav_setup_queue_range() local
1283 for_each_qmgr(kdev, qmgr) { in knav_setup_queue_range()
1284 start = max(qmgr->start_queue, range->queue_base); in knav_setup_queue_range()
1285 end = min(qmgr->start_queue + qmgr->num_queues, in knav_setup_queue_range()
1288 index = id - qmgr->start_queue; in knav_setup_queue_range()
1290 &qmgr->reg_peek[index].ptr_size_thresh); in knav_setup_queue_range()
1292 &qmgr->reg_push[index].ptr_size_thresh); in knav_setup_queue_range()
1402 struct knav_qmgr_info *qmgr; in knav_queue_init_qmgrs() local
1412 qmgr = devm_kzalloc(dev, sizeof(*qmgr), GFP_KERNEL); in knav_queue_init_qmgrs()
1413 if (!qmgr) { in knav_queue_init_qmgrs()
1415 dev_err(dev, "out of memory allocating qmgr\n"); in knav_queue_init_qmgrs()
1422 qmgr->start_queue = temp[0]; in knav_queue_init_qmgrs()
1423 qmgr->num_queues = temp[1]; in knav_queue_init_qmgrs()
1425 dev_err(dev, "invalid qmgr queue range\n"); in knav_queue_init_qmgrs()
1426 devm_kfree(dev, qmgr); in knav_queue_init_qmgrs()
1430 dev_info(dev, "qmgr start queue %d, number of queues %d\n", in knav_queue_init_qmgrs()
1431 qmgr->start_queue, qmgr->num_queues); in knav_queue_init_qmgrs()
1433 qmgr->reg_peek = in knav_queue_init_qmgrs()
1438 qmgr->reg_status = in knav_queue_init_qmgrs()
1443 qmgr->reg_config = in knav_queue_init_qmgrs()
1448 qmgr->reg_region = in knav_queue_init_qmgrs()
1454 qmgr->reg_push = in knav_queue_init_qmgrs()
1461 qmgr->reg_pop = in knav_queue_init_qmgrs()
1466 if (IS_ERR(qmgr->reg_peek) || in knav_queue_init_qmgrs()
1468 (IS_ERR(qmgr->reg_status) || IS_ERR(qmgr->reg_pop))) || in knav_queue_init_qmgrs()
1469 IS_ERR(qmgr->reg_config) || IS_ERR(qmgr->reg_region) || in knav_queue_init_qmgrs()
1470 IS_ERR(qmgr->reg_push)) { in knav_queue_init_qmgrs()
1471 dev_err(dev, "failed to map qmgr regs\n"); in knav_queue_init_qmgrs()
1473 if (!IS_ERR(qmgr->reg_status)) in knav_queue_init_qmgrs()
1474 devm_iounmap(dev, qmgr->reg_status); in knav_queue_init_qmgrs()
1475 if (!IS_ERR(qmgr->reg_pop)) in knav_queue_init_qmgrs()
1476 devm_iounmap(dev, qmgr->reg_pop); in knav_queue_init_qmgrs()
1478 if (!IS_ERR(qmgr->reg_peek)) in knav_queue_init_qmgrs()
1479 devm_iounmap(dev, qmgr->reg_peek); in knav_queue_init_qmgrs()
1480 if (!IS_ERR(qmgr->reg_config)) in knav_queue_init_qmgrs()
1481 devm_iounmap(dev, qmgr->reg_config); in knav_queue_init_qmgrs()
1482 if (!IS_ERR(qmgr->reg_region)) in knav_queue_init_qmgrs()
1483 devm_iounmap(dev, qmgr->reg_region); in knav_queue_init_qmgrs()
1484 if (!IS_ERR(qmgr->reg_push)) in knav_queue_init_qmgrs()
1485 devm_iounmap(dev, qmgr->reg_push); in knav_queue_init_qmgrs()
1486 devm_kfree(dev, qmgr); in knav_queue_init_qmgrs()
1492 qmgr->reg_pop = qmgr->reg_push; in knav_queue_init_qmgrs()
1494 list_add_tail(&qmgr->list, &kdev->qmgrs); in knav_queue_init_qmgrs()
1495 …dev_info(dev, "added qmgr start queue %d, num of queues %d, reg_peek %p, reg_status %p, reg_config… in knav_queue_init_qmgrs()
1496 qmgr->start_queue, qmgr->num_queues, in knav_queue_init_qmgrs()
1497 qmgr->reg_peek, qmgr->reg_status, in knav_queue_init_qmgrs()
1498 qmgr->reg_config, qmgr->reg_region, in knav_queue_init_qmgrs()
1499 qmgr->reg_push, qmgr->reg_pop); in knav_queue_init_qmgrs()
1704 struct knav_qmgr_info *qmgr; in knav_find_qmgr() local
1706 for_each_qmgr(kdev, qmgr) { in knav_find_qmgr()
1707 if ((id >= qmgr->start_queue) && in knav_find_qmgr()
1708 (id < qmgr->start_queue + qmgr->num_queues)) in knav_find_qmgr()
1709 return qmgr; in knav_find_qmgr()
1720 inst->qmgr = knav_find_qmgr(id); in knav_queue_init_queue()
1721 if (!inst->qmgr) in knav_queue_init_queue()