Lines Matching refs:kdev
37 #define knav_range_offset_to_inst(kdev, range, q) \ argument
38 (range->queue_base_inst + (q << kdev->inst_shift))
43 struct knav_device *kdev = range->kdev; in __knav_acc_notify() local
47 range_base = kdev->base_id + range->queue_base; in __knav_acc_notify()
51 inst = knav_range_offset_to_inst(kdev, range, in __knav_acc_notify()
55 dev_dbg(kdev->dev, "acc-irq: notifying %d\n", in __knav_acc_notify()
62 inst = knav_range_offset_to_inst(kdev, range, queue); in __knav_acc_notify()
63 dev_dbg(kdev->dev, "acc-irq: notifying %d\n", in __knav_acc_notify()
74 struct knav_device *kdev = range->kdev; in knav_acc_set_notify() local
88 dev_dbg(kdev->dev, "setup-notify: re-triggering irq for %s\n", in knav_acc_set_notify()
101 struct knav_device *kdev; in knav_acc_int_handler() local
109 kdev = range->kdev; in knav_acc_int_handler()
113 range_base = kdev->base_id + range->queue_base; in knav_acc_int_handler()
118 kq = knav_range_offset_to_inst(kdev, range, queue); in knav_acc_int_handler()
125 dev_dbg(kdev->dev, "acc-irq: channel %d, list %d, virt %p, phys %x\n", in knav_acc_int_handler()
140 dma_sync_single_for_cpu(kdev->dev, list_dma, info->list_size, in knav_acc_int_handler()
146 dev_dbg(kdev->dev, in knav_acc_int_handler()
150 dev_dbg(kdev->dev, in knav_acc_int_handler()
154 dev_dbg(kdev->dev, in knav_acc_int_handler()
168 dev_err(kdev->dev, in knav_acc_int_handler()
175 kq = knav_range_offset_to_inst(kdev, range, in knav_acc_int_handler()
181 dev_err(kdev->dev, in knav_acc_int_handler()
190 dev_dbg(kdev->dev, "acc-irq: enqueue %08x at %d, queue %d\n", in knav_acc_int_handler()
196 dma_sync_single_for_device(kdev->dev, list_dma, info->list_size, in knav_acc_int_handler()
215 struct knav_device *kdev = range->kdev; in knav_range_setup_acc_irq() local
238 dev_dbg(kdev->dev, in knav_range_setup_acc_irq()
246 dev_dbg(kdev->dev, in knav_range_setup_acc_irq()
254 dev_warn(range->kdev->dev, in knav_range_setup_acc_irq()
262 dev_dbg(kdev->dev, "setup-acc-irq: freeing %s for channel %s\n", in knav_range_setup_acc_irq()
266 dev_warn(range->kdev->dev, in knav_range_setup_acc_irq()
294 knav_acc_write(struct knav_device *kdev, struct knav_pdsp_info *pdsp, in knav_acc_write() argument
299 dev_dbg(kdev->dev, "acc command %08x %08x %08x %08x %08x\n", in knav_acc_write()
317 static void knav_acc_setup_cmd(struct knav_device *kdev, in knav_acc_setup_cmd() argument
351 static void knav_acc_stop(struct knav_device *kdev, in knav_acc_stop() argument
361 knav_acc_setup_cmd(kdev, range, &cmd, queue); in knav_acc_stop()
363 result = knav_acc_write(kdev, range->acc_info.pdsp, &cmd); in knav_acc_stop()
365 dev_dbg(kdev->dev, "stopped acc channel %s, result %s\n", in knav_acc_stop()
369 static enum knav_acc_result knav_acc_start(struct knav_device *kdev, in knav_acc_start() argument
379 knav_acc_setup_cmd(kdev, range, &cmd, queue); in knav_acc_start()
381 result = knav_acc_write(kdev, range->acc_info.pdsp, &cmd); in knav_acc_start()
383 dev_dbg(kdev->dev, "started acc channel %s, result %s\n", in knav_acc_start()
391 struct knav_device *kdev = range->kdev; in knav_acc_init_range() local
399 knav_acc_stop(kdev, range, queue); in knav_acc_init_range()
401 result = knav_acc_start(kdev, range, queue); in knav_acc_init_range()
417 kq->descs = devm_kzalloc(range->kdev->dev, in knav_acc_init_queue()
446 struct knav_device *kdev = range->kdev; in knav_acc_free_range() local
462 dma_unmap_single(kdev->dev, acc->list_dma[0], in knav_acc_free_range()
466 devm_kfree(range->kdev->dev, range->acc); in knav_acc_free_range()
488 int knav_init_acc_range(struct knav_device *kdev, in knav_init_acc_range() argument
515 dev_err(kdev->dev, "channel %d invalid for range %s\n", in knav_init_acc_range()
521 dev_err(kdev->dev, "pacing mode %d invalid for range %s\n", in knav_init_acc_range()
526 pdsp = knav_find_pdsp(kdev, info->pdsp_id); in knav_init_acc_range()
528 dev_err(kdev->dev, "pdsp id %d not found for range %s\n", in knav_init_acc_range()
534 dev_err(kdev->dev, "pdsp id %d not started for range %s\n", in knav_init_acc_range()
545 dev_err(kdev->dev, in knav_init_acc_range()
551 dev_err(kdev->dev, in knav_init_acc_range()
564 range->acc = devm_kzalloc(kdev->dev, channels * sizeof(*range->acc), in knav_init_acc_range()
578 list_dma = dma_map_single(kdev->dev, list_mem, mem_size, in knav_init_acc_range()
580 if (dma_mapping_error(kdev->dev, list_dma)) { in knav_init_acc_range()
586 dma_sync_single_for_device(kdev->dev, list_dma, mem_size, in knav_init_acc_range()
594 dev_dbg(kdev->dev, "%s: channel %d, phys %08x, virt %8p\n", in knav_init_acc_range()