Lines Matching refs:qmgr
234 id = inst->id - inst->qmgr->start_queue; in __knav_queue_open()
235 qh->reg_push = &inst->qmgr->reg_push[id]; in __knav_queue_open()
236 qh->reg_pop = &inst->qmgr->reg_pop[id]; in __knav_queue_open()
237 qh->reg_peek = &inst->qmgr->reg_peek[id]; in __knav_queue_open()
505 unsigned id = inst->id - inst->qmgr->start_queue; in knav_queue_flush()
508 writel_relaxed(0, &inst->qmgr->reg_push[id].ptr_size_thresh); in knav_queue_flush()
986 struct knav_qmgr_info *qmgr; in knav_queue_setup_region() local
1047 for_each_qmgr(kdev, qmgr) { in knav_queue_setup_region()
1048 regs = qmgr->reg_region + id; in knav_queue_setup_region()
1184 struct knav_qmgr_info *qmgr; in knav_queue_setup_link_ram() local
1186 for_each_qmgr(kdev, qmgr) { in knav_queue_setup_link_ram()
1190 writel_relaxed((u32)block->dma, &qmgr->reg_config->link_ram_base0); in knav_queue_setup_link_ram()
1193 &qmgr->reg_config->link_ram_size0); in knav_queue_setup_link_ram()
1196 &qmgr->reg_config->link_ram_size0); in knav_queue_setup_link_ram()
1203 writel_relaxed(block->dma, &qmgr->reg_config->link_ram_base1); in knav_queue_setup_link_ram()
1214 struct knav_qmgr_info *qmgr; in knav_setup_queue_range() local
1281 for_each_qmgr(kdev, qmgr) { in knav_setup_queue_range()
1282 start = max(qmgr->start_queue, range->queue_base); in knav_setup_queue_range()
1283 end = min(qmgr->start_queue + qmgr->num_queues, in knav_setup_queue_range()
1286 index = id - qmgr->start_queue; in knav_setup_queue_range()
1288 &qmgr->reg_peek[index].ptr_size_thresh); in knav_setup_queue_range()
1290 &qmgr->reg_push[index].ptr_size_thresh); in knav_setup_queue_range()
1394 struct knav_qmgr_info *qmgr; in knav_queue_init_qmgrs() local
1400 qmgr = devm_kzalloc(dev, sizeof(*qmgr), GFP_KERNEL); in knav_queue_init_qmgrs()
1401 if (!qmgr) { in knav_queue_init_qmgrs()
1409 qmgr->start_queue = temp[0]; in knav_queue_init_qmgrs()
1410 qmgr->num_queues = temp[1]; in knav_queue_init_qmgrs()
1413 devm_kfree(dev, qmgr); in knav_queue_init_qmgrs()
1418 qmgr->start_queue, qmgr->num_queues); in knav_queue_init_qmgrs()
1420 qmgr->reg_peek = in knav_queue_init_qmgrs()
1425 qmgr->reg_status = in knav_queue_init_qmgrs()
1430 qmgr->reg_config = in knav_queue_init_qmgrs()
1435 qmgr->reg_region = in knav_queue_init_qmgrs()
1441 qmgr->reg_push = in knav_queue_init_qmgrs()
1448 qmgr->reg_pop = in knav_queue_init_qmgrs()
1453 if (IS_ERR(qmgr->reg_peek) || in knav_queue_init_qmgrs()
1455 (IS_ERR(qmgr->reg_status) || IS_ERR(qmgr->reg_pop))) || in knav_queue_init_qmgrs()
1456 IS_ERR(qmgr->reg_config) || IS_ERR(qmgr->reg_region) || in knav_queue_init_qmgrs()
1457 IS_ERR(qmgr->reg_push)) { in knav_queue_init_qmgrs()
1460 if (!IS_ERR(qmgr->reg_status)) in knav_queue_init_qmgrs()
1461 devm_iounmap(dev, qmgr->reg_status); in knav_queue_init_qmgrs()
1462 if (!IS_ERR(qmgr->reg_pop)) in knav_queue_init_qmgrs()
1463 devm_iounmap(dev, qmgr->reg_pop); in knav_queue_init_qmgrs()
1465 if (!IS_ERR(qmgr->reg_peek)) in knav_queue_init_qmgrs()
1466 devm_iounmap(dev, qmgr->reg_peek); in knav_queue_init_qmgrs()
1467 if (!IS_ERR(qmgr->reg_config)) in knav_queue_init_qmgrs()
1468 devm_iounmap(dev, qmgr->reg_config); in knav_queue_init_qmgrs()
1469 if (!IS_ERR(qmgr->reg_region)) in knav_queue_init_qmgrs()
1470 devm_iounmap(dev, qmgr->reg_region); in knav_queue_init_qmgrs()
1471 if (!IS_ERR(qmgr->reg_push)) in knav_queue_init_qmgrs()
1472 devm_iounmap(dev, qmgr->reg_push); in knav_queue_init_qmgrs()
1473 devm_kfree(dev, qmgr); in knav_queue_init_qmgrs()
1479 qmgr->reg_pop = qmgr->reg_push; in knav_queue_init_qmgrs()
1481 list_add_tail(&qmgr->list, &kdev->qmgrs); in knav_queue_init_qmgrs()
1483 qmgr->start_queue, qmgr->num_queues, in knav_queue_init_qmgrs()
1484 qmgr->reg_peek, qmgr->reg_status, in knav_queue_init_qmgrs()
1485 qmgr->reg_config, qmgr->reg_region, in knav_queue_init_qmgrs()
1486 qmgr->reg_push, qmgr->reg_pop); in knav_queue_init_qmgrs()
1670 struct knav_qmgr_info *qmgr; in knav_find_qmgr() local
1672 for_each_qmgr(kdev, qmgr) { in knav_find_qmgr()
1673 if ((id >= qmgr->start_queue) && in knav_find_qmgr()
1674 (id < qmgr->start_queue + qmgr->num_queues)) in knav_find_qmgr()
1675 return qmgr; in knav_find_qmgr()
1686 inst->qmgr = knav_find_qmgr(id); in knav_queue_init_queue()
1687 if (!inst->qmgr) in knav_queue_init_queue()